Opened 7 years ago

Closed 7 years ago

#54596 closed defect (fixed)

Tcl @8.6.7 does not build on PPC Tiger, Mac oS x 10.4.11, because "#pragma GCC diagnostic not allowed inside functions"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: tiger Cc:
Port: tcl

Description

/opt/local/bin/gcc-apple-4.2 -c -Os -pipe -Os -arch ppc -pipe  -DSQLITE_WITHOUT_ZONEMALLOC  -Wall -fno-common -DBUILD_tcl -I"." -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/generic -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tcl\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -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 -DNO_VALUES_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DHAVE_ZLIB=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)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VE_GETATTRLIST=1 -DHAVE_COPYFILE=1 -DHAVE_LIBKERN_OSATOMIC_H=1 -DHAVE_OSSPINLOCKLOCK=1 -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=\"utf-8\" -DTCL_LOAD_FROM_MEMORY=1 -DTCL_WIDE_CLICKS=1 -DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_WEAK_IMPORT=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DTCL_UNLOAD_DLLS=1       /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix/tclUnixSock.c
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix/tclUnixSock.c: In function 'IPv6AddressNeedsNumericRendering':
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix/tclUnixSock.c:716: error: #pragma GCC diagnostic not allowed inside functions
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix/tclUnixSock.c:717: error: #pragma GCC diagnostic not allowed inside functions
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix/tclUnixSock.c:719: error: #pragma GCC diagnostic not allowed inside functions
make: *** [tclUnixSock.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.7/unix" && /usr/bin/make -w all 

Attachments (1)

main.log (256.6 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
PPC Tiger main.log

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

PPC Tiger main.log

comment:1 Changed 7 years ago by GussyFinkNottle

I have the same problem, but on snow leopard. I have tried to build also with several macports compilers, but none of them will accept such pragmas. Some obscure osx issue is mentioned in the part of the source program at fault.

The macport version of tcl@8.6.7 on osx 10.11.6 appears to be fine, but I'm not sure if it came pre-built.

comment:2 Changed 7 years ago by kencu (Ken)

comment:3 Changed 7 years ago by kencu (Ken)

FYI - same fix already incorporated into tcl trunk -- will roll out in some subsequent release.

comment:4 Changed 7 years ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 96734caea8b0b233b1b78437c0be8626775f1050/macports-ports:

tcl: fix error on older compilers re: pragmas inside functions

move pragma just outside the function
fixes build on older gcc compilers
closes: #54596

Note: See TracTickets for help on using tickets.