tcl upgrade fails - odcctools problem?
Yves de Champlain
yves at macports.org
Thu Jun 14 05:54:47 PDT 2007
Le 07-06-14 à 05:32, Jochen Küpper a écrit :
> I assume in this build gcc is picking up the wrong mach-o/arch.h
> file, which is causing the problem. See below for details.
>
> On 11.06.2007, at 15:40, Jochen Küpper wrote:
>
>> Upgrading tcl on PPC Mac OS X fails with the following error:
>>
>> > sudo port upgrade tcl
>> ---> Fetching tcl
>> ---> Verifying checksum(s) for tcl
>> ---> Extracting tcl
>> ---> Configuring tcl
>> ---> Building tcl with target all
>> Error: Target com.apple.build returned: shell command " cd "/opt/
>> local/var/db/dports/build/
>> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate
>> _dports_lang_tcl/work/tcl8.4.15/unix" && make all " returned error 2
>>
>> [...]
>>
>> gcc -c -Os -O2 -pipe -I/opt/local/include -DTCL_DBGX= -Wall -Wno-
>> implicit-int -fno-strict-aliasing -fno-common -I/opt/local/var/db/
>> dports/build/
>> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate
>> _dports_lang_tcl/work/tcl8.4.15/unix/../generic -I/opt/local/var/
>> db/dports/build/
>> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate
>> _dports_lang_tcl/work/tcl8.4.15/unix -DNO_VALUES_H=1 -
>> DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -
>> DHAVE_COREFOUNDATION=1 -DMAC_OSX_TCL=1 -DTCL_WIDE_INT_TYPE=long\
>> long -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -
>> DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -
>> DHAVE_TMPNAM=1 -DHAVE_WAITPID=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_ST_BLKSIZE=1 -
>> DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -
>> DHAVE_LANGINFO=1 -DHAVE_COPYFILE=1 -DHAVE_LIBKERN_OSATOMIC_H=1 -
>> DHAVE_OSSPINLOCKLOCK=1 -DHAVE_PTHREAD_ATFORK=1 -DUSE_VFORK=1 -
>> DTCL_DEFAULT_ENCODING=\"utf-8\" -DTCL_LOAD_FROM_MEMORY=1 -
>> DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -
>> DHAVE_SYS_FILIO_H=1 -DTCL_SHLIB_EXT=\".dylib\" /opt/local/
>> var/db/dports/build/
>> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate
>> _dports_lang_tcl/work/tcl8.4.15/unix/tclLoadDyld.c
>> In file included from /opt/local/var/db/dports/build/
>> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate
>> _dports_lang_tcl/work/tcl8.4.15/unix/tclLoadDyld.c:23:
>> /opt/local/include/mach-o/arch.h:35: error: nested redefinition of
>> 'enum NXByteOrder'
>> /opt/local/include/mach-o/arch.h:35: error: redeclaration of 'enum
>> NXByteOrder'
>> /opt/local/include/mach-o/arch.h:36: error: redeclaration of
>> enumerator 'NX_UnknownByteOrder'
>> /usr/include/architecture/byte_order.h:137: error: previous
>> definition of 'NX_UnknownByteOrder' was here
>> /opt/local/include/mach-o/arch.h:37: error: redeclaration of
>> enumerator 'NX_LittleEndian'
>> /usr/include/architecture/byte_order.h:138: error: previous
>> definition of 'NX_LittleEndian' was here
>> /opt/local/include/mach-o/arch.h:39: error: redeclaration of
>> enumerator 'NX_BigEndian'
>> /usr/include/architecture/byte_order.h:140: error: previous
>> definition of 'NX_BigEndian' was here
>> make: *** [tclLoadDyld.o] Error 1
>>
>> Error: Unable to upgrade port: 1
>>
>> Anyone else seen this? Any idea why it happens?
>
> Ok, so the file /opt/local/include/mach-o/arch.h is from odcctools.
> However, I do not see what is wrong with it, here's the relevant
> snippet (starting from line 23):
>
> #ifndef _MACH_O_ARCH_H_
> #define _MACH_O_ARCH_H_
> /*
> * Copyright (c) 1997 Apple Computer, Inc.
> *
> * Functions that deal with information about architectures.
> *
> */
>
> #include <stdint.h>
> #include <mach-o/machine.h>
>
> enum NXByteOrder {
> NX_UnknownByteOrder,
> NX_LittleEndian,
> NX_BigEndian
> };
>
>
> Can it be that the standard gcc (from Apple) does not go along with
> the odcctools arch.h file? Would it be ok or even useful to remove
> the -I/opt/local/include" from the compile-line above or to add /
> usr/include before?
You can at least try to deactivate odcctools and retry, so we'll know
if the problem is really there or not.
port deactivate odcctools
port upgrade tcl
port activate odcctools
yves
More information about the macports-users
mailing list