[MacPorts] #30076: Build fails on Tiger/PowerPC (error: 'MAP_ANON' undeclared) due to the configure.cppflags-append line
#30076: Build fails on Tiger/PowerPC (error: 'MAP_ANON' undeclared) due to the configure.cppflags-append line ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: waqar@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: boehmgc ---------------------------------+------------------------------------------ The build fails on Tiger with the error: {{{ /usr/bin/gcc-4.0 -DPACKAGE_NAME=\"gc\" -DPACKAGE_TARNAME=\"gc\" -DPACKAGE_VERSION=\"7.1\" "-DPACKAGE_STRING=\"gc 7.1\"" -DPACKAGE_BUGREPORT=\"Hans.Boehm@hp.com\" -DGC_VERSION_MAJOR=7 -DGC_VERSION_MINOR=1 -DPACKAGE=\"gc\" -DVERSION=\"7.1\" -DGC_DARWIN_THREADS=1 -DTHREAD_LOCAL_ALLOC=1 -DHAS_PPC_THREAD_STATE_R0=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DGC_GCJ_SUPPORT=1 -DJAVA_FINALIZATION=1 -DATOMIC_UNCOLLECTABLE=1 -I./include -I/opt/local/include -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -fexceptions -I libatomic_ops/src -pipe -O2 -arch ppc -MT os_dep.lo -MD -MP -MF .deps/os_dep.Tpo -c os_dep.c -fno-common -DPIC -o .libs/os_dep.o os_dep.c: In function 'GC_unix_mmap_get_mem': os_dep.c:1780: error: 'MAP_ANON' undeclared (first use in this function) os_dep.c:1780: error: (Each undeclared identifier is reported only once os_dep.c:1780: error: for each function it appears in.) os_dep.c: In function 'GC_read_dirty': os_dep.c:3063: warning: incompatible implicit declaration of built-in function 'bcopy' os_dep.c:3065: warning: incompatible implicit declaration of built-in function 'bzero' }}} The problem seems to come from missing header inclusion. Version 7.1_0 was already installed, and the only significant change (excluding x86, as I have a PowerPC machine) is the new line: {{{ configure.cppflags-append -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE }}} in Portfile. If I comment out this line, the build succeeds. -- Ticket URL: <https://trac.macports.org/ticket/30076> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30076: Build fails on Tiger/PowerPC (error: 'MAP_ANON' undeclared) due to the configure.cppflags-append line ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: waqar@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: boehmgc ---------------------------------+------------------------------------------ Changes (by vinc17@…): * cc: jeremyhu@… (added) Comment: Added jeremyhu to Cc, as the bug comes from r79740 (BTW, the real change does much more than what the log message says). There was a comment for darwin 11: {{{ # BUILD FIX TODO: # llvm-gcc-4.2 and clang fail to build os_dep.c as of 2011.06.15 # This is an error in the package. configure.compiler gcc-4.2 }}} and this may be the same problem as this is os_dep.c that fails (though gcc from Xcode is used). So, either the configure.cflags-append line should be dropped (this works) or a recent compiler should be used (not tried). The configure.cflags-append line comes from r79504, but I saw no build problems without it. -- Ticket URL: <https://trac.macports.org/ticket/30076#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30076: boehmgc build fails on Tiger/PowerPC (error: 'MAP_ANON' undeclared) due to the configure.cppflags-append line ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: waqar@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: boehmgc ---------------------------------+------------------------------------------ -- Ticket URL: <https://trac.macports.org/ticket/30076#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30076: boehmgc build fails on Tiger/PowerPC (error: 'MAP_ANON' undeclared) due to the configure.cppflags-append line ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: waqar@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: boehmgc ---------------------------------+------------------------------------------ Comment(by jeremyhu@…): * I moved it from cflags to cppflags for correctness. * -D_XOPEN_SOURCE is not a valid #define. You must specify a value for _XOPEN_SOURCE. * -D_DARWIN_C_SOURCE is wanted to pull in darwin extensions to POSIX (which is what was intended). _XOPEN_SOURCE is only provided to deal with boehmgc's use of very- deprecated functionality from ucontext.h MAP_ANON is defined in sys/mman.h, it is not POSIX and is thus pulled in with -D_DARWIN_C_SOURCE How is MAP_ANON conditionally declared on Tiger? Maybe it really does need the -D_NONSTD_SOURCE on Tiger ... ? -- Ticket URL: <https://trac.macports.org/ticket/30076#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30076: boehmgc build fails on Tiger/PowerPC (error: 'MAP_ANON' undeclared) due to the configure.cppflags-append line ----------------------------------+----------------------------------------- Reporter: vinc17@… | Owner: waqar@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: Port: boehmgc | ----------------------------------+----------------------------------------- Changes (by jeremyhu@…): * status: new => closed * resolution: => fixed Comment: ugg, Tiger has it only if !_POSIX_C_SOURCE, and _POSIX_C_SOURCE is defined with _XOPEN_SOURCE ... lucky for us, we don't need _XOPEN_SOURCE on Tiger for its ucontext.h r80260 -- Ticket URL: <https://trac.macports.org/ticket/30076#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts