Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARCHFLAGS parsing/concatenation in unixccompiler.py breaks when set to a string #47340

Closed
jnoller mannequin opened this issue Jun 12, 2008 · 4 comments
Closed

ARCHFLAGS parsing/concatenation in unixccompiler.py breaks when set to a string #47340

jnoller mannequin opened this issue Jun 12, 2008 · 4 comments
Labels
build The build process and cross-build

Comments

@jnoller
Copy link
Mannequin

jnoller mannequin commented Jun 12, 2008

BPO 3090
Nosy @birkenfeld
Files
  • unixccompiler.py.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-07-16.13:26:24.063>
    created_at = <Date 2008-06-12.13:16:21.856>
    labels = ['build']
    title = 'ARCHFLAGS parsing/concatenation in unixccompiler.py breaks when set to a string'
    updated_at = <Date 2008-07-16.13:26:24.062>
    user = 'https://bugs.python.org/jnoller'

    bugs.python.org fields:

    activity = <Date 2008-07-16.13:26:24.062>
    actor = 'jnoller'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-07-16.13:26:24.063>
    closer = 'jnoller'
    components = ['Build']
    creation = <Date 2008-06-12.13:16:21.856>
    creator = 'jnoller'
    dependencies = []
    files = ['10599']
    hgrepos = []
    issue_num = 3090
    keywords = ['patch']
    message_count = 4.0
    messages = ['68061', '69426', '69748', '69785']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'jnoller']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3090'
    versions = ['Python 2.6']

    @jnoller
    Copy link
    Mannequin Author

    jnoller mannequin commented Jun 12, 2008

    This is on osx 10.5.3, latest gcc tool chain.

    I have $ARCHFLAGS set to "-arch i386" to prevent the OS/X gcc from
    building PPC code (as I don't want/need it) - if I leave this set as-is,
    other applications build without error, intel only.

    If I don't unset it, here's the error:

    File "/Users/jesse/open_source/subversion/python-
    trunk/Lib/distutils/ccompiler.py", line 697, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    File "/Users/jesse/open_source/subversion/python-
    trunk/Lib/distutils/unixccompiler.py", line 176, in _compile
    compiler_so = _darwin_compiler_fixup(compiler_so, cc_args +
    extra_postargs)
    File "/Users/jesse/open_source/subversion/python-
    trunk/Lib/distutils/unixccompiler.py", line 79, in
    _darwin_compiler_fixup
    compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS']
    TypeError: can only concatenate list (not "str") to list
    make: *** [sharedmods] Error 1

    I've attached a possible patch for this which does a .split() on the os.environ['ARCHFLAGS'] variable, which fixes the issue

    @jnoller jnoller mannequin added the build The build process and cross-build label Jun 12, 2008
    @jnoller
    Copy link
    Mannequin Author

    jnoller mannequin commented Jul 8, 2008

    Does anyone have a problem with me committing this patch as-is? It's not a
    show stopper, but it's highly annoying.

    @birkenfeld
    Copy link
    Member

    I'd say go ahead.

    @jnoller
    Copy link
    Mannequin Author

    jnoller mannequin commented Jul 16, 2008

    This has been applied as of r65012 on trunk

    @jnoller jnoller mannequin closed this as completed Jul 16, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant