Artifacts Associated With Ticket 3522894
Ticket change [e9cba4d151] (rid 104869) by markatc on 2012-05-02 02:29:33:
- assignee initialized to: "stwo"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This occurs on Solaris 10 + 11 x86 and SPARC, using the Sun Studio 12.x compilers. [...] cc -c -O -I/usr/local/include -L/usr/local/lib -KPIC -I"." -I/var/tmp/tcl8.5.11/unix/../unix -I/var/tmp/tcl8.5.11/unix/../generic -I/var/tmp/tcl8.5.11/unix/../libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -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 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_DIRENT64=1 -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_BLKCNT_T=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DTCL_UNLOAD_DLLS=1 /var/tmp/tcl8.5.11/unix/../unix/tclAppInit.c cc -O -I/usr/local/include -L/usr/local/lib -I/usr/local/include -L/usr/local/lib tclAppInit.o -L/var/tmp/tcl8.5.11/unix -ltcl8.5 -ldl -lsocket -lnsl -lsunmath -lm \ -Wl,-R,/tcl/lib -o tclsh host:/var/tmp/tcl8.5.11/unix root# gmake install Making directory /tcl/lib Making directory /tcl/bin Installing libtcl8.5.so to /tcl/lib/ Installing tclsh as /tcl/bin/tclsh8.5 Installing tclConfig.sh to /tcl/lib/ Installing libtclstub8.5.a to /tcl/lib/ Installing message catalogs ld.so.1: tclsh: fatal: relocation error: file /var/tmp/tcl8.5.11/unix/libtcl8.5.so: symbol TclBN_mp_init_set_int: referenced symbol not found gmake: *** [install-msgs] Killed # nm libtcl8.5.so [...] [2646] | 1124908| 172|FUNC |GLOB |0 |9 |TclBN_mp_grow [2287] | 1125104| 104|FUNC |GLOB |0 |9 |TclBN_mp_init [2428] | 1125208| 52|FUNC |GLOB |0 |9 |TclBN_mp_init_copy [1683] | 1125260| 204|FUNC |GLOB |0 |9 |TclBN_mp_init_multi [2324] | 1125464| 48|FUNC |GLOB |0 |9 |TclBN_mp_init_set [1516] | 0| 0|FUNC |GLOB |0 |UNDEF |TclBN_mp_init_set_int [1807] | 1125580| 156|FUNC |GLOB |0 |9 |TclBN_mp_init_size [2640] | 1125736| 2720|FUNC |GLOB |0 |9 |TclBN_mp_karatsuba_mul [2083] | 1128456| 1688|FUNC |GLOB |0 |9 |TclBN_mp_karatsuba_sqr [2735] | 1130168| 892|FUNC |GLOB |0 |9 |TclBN_mp_lshd [2170] | 1131060| 144|FUNC |GLOB |0 |9 |TclBN_mp_mod [...] host:/var/tmp/tcl8.5.11 root# find . -print | xargs grep TclBN_mp_init_set_int ./generic/tclTomMathDecls.h:#define mp_init_set_int TclBN_mp_init_set_int ./generic/tclTomMathDecls.h:#ifndef TclBN_mp_init_set_int_TCL_DECLARED ./generic/tclTomMathDecls.h:#define TclBN_mp_init_set_int_TCL_DECLARED ./generic/tclTomMathDecls.h:EXTERN int TclBN_mp_init_set_int(mp_int*a, unsigned long i); ./generic/tclTomMathDecls.h:#ifndef TclBN_mp_init_set_int ./generic/tclTomMathDecls.h:#define TclBN_mp_init_set_int \ ./generic/tclStubInit.c: TclBN_mp_init_set_int, /* 61 */ ./generic/tclTomMath.decls: int TclBN_mp_init_set_int(mp_int* a, unsigned long i) - foundin initialized to: "obsolete: 8.5.11"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "markatc"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to:
Solaris build fails: TclBN_mp_init_set_int not found
- type initialized to: "Bug"
Ticket change [de5cc46b6a] (rid 114833) by dgp on 2012-05-03 00:32:47:
- icomment:
Precisely what are you building? Where did it come from?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2e23ed1597] (rid 119171) by dgp on 2012-05-04 03:45:07:
- icomment:
I see this is a build as root? Do you have the same troubles building as a non-superuser?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [da5c50abe7] (rid 107767) by dgp on 2012-05-04 04:03:37:
- assignee changed to: "dgp"
- closedate changed to: "2012-05-03T21:03:37"
- closer changed to: "dgp"
- icomment:
Can't reproduce on a Solaris 10 sparc system with Forte Developer 7 C 5.4 and a regular user account. If you've got more details that can tell us what can help, attach them.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- status changed to: "Pending"
- username: "dgp"
Ticket change [5e78614cbd] (rid 115640) by markatc on 2012-05-04 07:48:57:
- icomment:
This is the recipe: cd /var/tmp rm -rf /tcl tcl8.5.11 untgz /usr/local/src/tcl/tcl8.5.11-src.tar.gz mkdir /tcl cd tcl8.5.11/unix/ ./configure \ --prefix=/tcl \ --enable-shared \ --enable-dtrace gmake gmake test gmake install The tclsh problem doesn't occur when compiling as a non-root user. It compiles and installs as expected. What's in the build that makes a difference to that? - login: "markatc"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "markatc"
- icomment:
Ticket change [b63c15611b] (rid 125386) by markatc on 2012-05-04 07:54:05:
- icomment:
# cc -V cc: Sun C 5.11 SunOS_i386 145355-01 2010/10/11 # uname -a SunOS x86host 5.10 Generic_142901-13 i86pc i386 i86pc # cc -V cc: Sun C 5.11 SunOS_sparc 145354-01 2010/10/11 # uname -a SunOS host 5.10 Generic_142909-17 sun4v sparc SUNW,T5240 # env LANG=en_US.UTF-8 LC_COLLATE=C USER=root GROUP=root HOST=host JAVA_HOME=/usr/java LD_RUN_PATH=/usr/local/lib:/lib:/usr/lib CC=cc CXX=CC LDFLAGS=-I/usr/local/include -L/usr/local/lib CPPFLAGS=-I/usr/local/include -L/usr/local/lib
- login: "markatc"
- mimetype: "text/plain"
- username: "markatc"
- icomment:
Ticket change [8a4d32692d] (rid 127370) by stwo on 2012-05-06 11:02:51:
- icomment:
Please attach a full build log.
- login: "stwo"
- mimetype: "text/plain"
- username: "stwo"
- icomment:
Ticket change [741b051423] (rid 105149) by pooryorick on 2012-06-14 06:34:16:
- icomment:
I got this same error when compiling tcl-8.5.11 on a Linux host. After making sure that CPPFLAGS included ...tcl8.5.11/generic prior to other directories that contained older versions of tclTomMath.h, the problem went away.
- login: "pooryorick"
- mimetype: "text/plain"
- username: "pooryorick"
- icomment:
Ticket change [3c2de4692e] (rid 120878) by stwo on 2012-06-16 03:08:25:
- icomment:
Looks like the presence of CPPFLAGS and LDFLAGS in your environment is causing the build to use different (installed) includes and libs. Should these flags be placed after Tcl's in compiler/linker invocations?
- login: "stwo"
- mimetype: "text/plain"
- username: "stwo"
- icomment:
Ticket change [3fd77eadbf] (rid 121531) by pooryorick on 2012-06-18 23:34:21:
- icomment:
I think the sane approach might be to have key directories like ...tcl8.5.11/generic (where ... probably represents some variable guaranteed to resolve to the build-time source directory) unequivocally appear before CPPFLAGS. in the Makefiles. Nearly always, when a user is specifying CPPFLAGS, they intend to supplement the distribution header files, not override them. The user who actually wants to override distribution header files will probably have the skills to find a way to do that.
- login: "pooryorick"
- mimetype: "text/plain"
- username: "pooryorick"
- icomment:
Ticket change [8eb1d41e80] (rid 120156) by dkf on 2012-06-19 19:32:23:
- icomment:
If it works when building as non-root, do that. Only installation to a shared directory requires elevated privileges.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [c48bfd8331] (rid 111863) by dkf on 2012-06-19 19:40:51:
- icomment:
Also, Tcl's configure merges the CPPFLAGS into the definition of CFLAGS for you (as long as you don't override directly; check the generated Makefile and try unsetting before the make step) and the Makefile only uses LDFLAGS when linking.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [93ff11d205] (rid 105908) by dkf on 2012-06-19 20:40:42:
- icomment:
Umm, by "unsetting" I mean "unsetting it in your environment variables"; remember, they _override_ the makefile if present.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [5760f93630] (rid 259679) by serhiy.storchaka on 2026-10-21 09:06:36:
- icomment:
The cause was the user's CPPFLAGS (<tt>-I/usr/local/include</tt> with older installed Tcl headers) coming before Tcl's own include directories. Since [8619c767c0] (8.6.12, and in 9.0) Tcl's own -I directories come first. Checked on Linux with a directory of decoy <tt>tcl.h</tt>/<tt>tclInt.h</tt>/<tt>tclPort.h</tt> passed in CPPFLAGS: 8.6.11 picks them up and fails, 8.6.12, core-8-6-branch and main build fine. Closing as fixed.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment: