Opened 10 years ago

Closed 9 years ago

#27713 closed defect (worksforme)

python26 @2.6.6 Segmentation fault when building

Reported by: macports@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: python26

Description

Versions:

  • Mac OS X 10.6.5
  • Xcode 3.2.5

Command: sudo port install python26

Python26 fails to build on a fresh port installation.

DEBUG: Executing org.macports.build (python26)
DEBUG: Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.6" && /usr/bin/make -j5 all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.2"'
/bin/sh: line 1: 32774 Segmentation fault      DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.6: CC='/usr/bin/gcc-4.2' LDSHARED='/usr/bin/gcc-4.2 -L/opt/local/lib -arch x86_64 -bundle -undefined dynamic_lookup' LDFLAGS='-L/opt/local/lib -arch x86_64' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python.exe -E ./setup.py -q --no-user-cfg build
make: *** [sharedmods] Error 139
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.6" && /usr/bin/make -j5 all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.2" " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
DEBUG: Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for python26): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for python26 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/main.log

Attachments (4)

main.log (91.2 KB) - added by macports@… 10 years ago.
log from the failing build
gdb.log (13.9 KB) - added by macports@… 10 years ago.
Log from gdb when running the failing command manually
gdb.2.log (13.9 KB) - added by macports@… 10 years ago.
Log from gdb when running the failing command manually
python.exe_2010-12-18-093804_localhost.crash (24.2 KB) - added by macports@… 10 years ago.
Crash file from /Library/Logs/DiagnosticReports

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by macports@…

Attachment: main.log added

log from the failing build

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Keywords: python python26 snow leopard segmentation removed
Owner: changed from macports-tickets@… to mcalhoun@…

Please remember to cc the maintainer. It would probably be helpful if you could attach the crash log.

Changed 10 years ago by macports@…

Attachment: gdb.log added

Log from gdb when running the failing command manually

Changed 10 years ago by macports@…

Attachment: gdb.2.log added

Log from gdb when running the failing command manually

comment:2 Changed 10 years ago by macports@…

It seems to be a problem with the "--no-user-cfg" option, it did some kind of check over and over again including my users python modules $HOME/Library/Python/2.6/site-packages/ until it finally crashed.

I found a workaround:
When I removed the $HOME/Library/Python directory I managed to complete the build.

is-imac:Python-2.6.6 david$ env DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.6: CC='/usr/bin/gcc-4.2' LDSHARED='/usr/bin/gcc-4.2 -L/opt/local/lib -arch x86_64\
 -bundle -undefined dynamic_lookup' LDFLAGS='-L/opt/local/lib -arch x86_64' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' sudo dtruss -f ./python.exe -E ./setup.py -q --no-user-cfg build                                                                
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]                                                                                                                                                                                               
   or: setup.py --help [cmd1 cmd2 ...]                                                                                                                                                                                                                              
      or: setup.py --help-commands                                                                                                                                                                                                                                  
         or: setup.py cmd --help                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
         error: option --no-user-cfg not recognized
[...]                                                                                                                                                                                                                 

comment:3 Changed 10 years ago by jmroot (Joshua Root)

It didn't generate a log in /Library/Logs/DiagnosticReports or ~/Library/Logs/DiagnosticReports?

Changed 10 years ago by macports@…

Crash file from /Library/Logs/DiagnosticReports

comment:4 Changed 9 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: newclosed

Can't reproduce with current versions; I have stuff in ~/Library/Python and it builds fine. Note that the command in comment:2 is incorrect as it sets the environment variables before running sudo, which then clears most of the environment.

Note: See TracTickets for help on using tickets.