[MacPorts] #19052: 'selfupdate' fails if MacPorts' GCC installed, selected, and first in PATH

MacPorts noreply at macports.org
Mon Mar 30 06:40:01 PDT 2009


#19052: 'selfupdate' fails if MacPorts' GCC installed, selected, and first in PATH
------------------------------+---------------------------------------------
 Reporter:  mlk@…             |       Owner:  macports-tickets@…                   
     Type:  defect            |      Status:  new                                  
 Priority:  High              |   Milestone:  MacPorts Future                      
Component:  base              |     Version:  1.7.1                                
 Keywords:  selfupdate, gcc   |        Port:                                       
------------------------------+---------------------------------------------
 I'm compiling using the latest XCode (3.1.2) and OSX (10.5.6) for Intel-
 Mac, upgrading from MacPorts 1.7.0 to 1.7.1 .

 When executing 'sudo port selfupdate', the script to execute configuring
 (defined by base/src/macports1.0/macports.tcl:1908, which is installed as
 /Library/Tcl/macports1.0/macports.tcl ) doesn't set the environment
 variable CC=/usr/bin/gcc , or take the user's setting for it -- instead
 relying on the first 'gcc' found in the environment PATH.  If the
 selfupdate command is issued when one of MacPorts' GCC ports is installed
 and selected (via gcc_select), then 'which gcc' will be
 '/opt/local/bin/gcc' and that will be a symlink pointing to the MacPorts'
 installed GCC.  'configure' will find that version instead of Apple's,
 which seems to be required for proper compilation.  The resulting error
 when not using Apple's GCC will be something along the lines of:

 {{{
     while executing
 "macports::selfupdate [array get global_options]"
 Error: /opt/local/bin/port: port selfupdate failed: Error installing new
 MacPorts base:
 shell command "cd
 /opt/local/var/macports/sources/rsync.macports.org/release/base &&
 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-
 install-user=root
 --with-install-group=admin --with-directory-mode=0755 && make && make
 install"
 returned error 2
 Command output:
 /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h:80:
 error: expected ';' before '__attribute__'
 /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h:83:
 error: expected ';' before '__attribute__'

 [snip]
 }}}

 the actual error (via debug output) will be something along the lines of:

 {{{
 ===> making all in src/tclobjc1.0
 gcc -c -DUSE_TCL_STUBS -g -O2  -g -Os -DHAVE_CONFIG_H -I.. -I.
 -I"/usr/include"  -DTCL_THREADS=1
 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1
 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1
 -DHAVE_PTHREAD_ATFORK=1 -DHAVE_READDIR_R=1 -DMAC_OSX_TCL=1
 -DHAVE_CFBUNDLE=1 -DUSE_VFORK=1
 -DTCL_DEFAULT_ENCODING=\"utf-8\" -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1
 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1
 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1
 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1
 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1
 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1
 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1
 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1
 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -include
 tclArch.h  -UPACKAGE_NAME -UPACKAGE_TARNAME
 -UPACKAGE_VERSION -UPACKAGE_STRING -UPACKAGE_BUGREPORT -fno-common
 tclobjc.m -o tclobjc.o
 In file included from
 /System/Library/Frameworks/Foundation.framework/Headers/NSAffineTransform.h:5,
                  from
 /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:13,
                  from tclobjc.m:42:
 /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:122:
 error: expected ';' before '__attribute__'

 [snip]
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/19052>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list