Artifacts Associated With Ticket 541181ffffffffffffffffffffffffffffffffff
Ticket change [973b8b2f1a] (rid 106470) by dgp on 2002-04-08 19:54:33:
- assignee initialized to: "mdejong"
- cmimetype initialized to: "text/plain"
- comment initialized to:
CC -ptr./solaris -staticlib=Crun solaris/omfsh.o -L../../pkg/if/solaris -lif -L../../pkg/nb/solaris -lnb -L../../pkg/oc/solaris -loc -L/home/fs3c/dgp/sparc/solaris2/lib -ltk8.4 -L/home/fs3c/dgp/sparc/solaris2/lib -ltcl8.4 -L/usr/openwin/lib -lX11 -ldl -lsocket -lnsl -lm -o solaris/omfsh Undefined first referenced symbol in file __ashldi3 /home/fs3c/dgp/sparc/solaris2/lib/libtcl8.4.so __ashrdi3 /home/fs3c/dgp/sparc/solaris2/lib/libtcl8.4.so __floatdidf /home/fs3c/dgp/sparc/solaris2/lib/libtcl8.4.so ld: fatal: Symbol referencing errors. No output written to solaris/omfsh
- foundin initialized to: "obsolete: 8.4a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to: "link error embedding Tcl on Solaris"
- type initialized to: "Bug"
Ticket change [5c3ad89d63] (rid 115264) by dgp on 2002-04-09 02:57:40:
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=80530 These symbols seem to come in due to generic/tclExecute.c.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "47. Bytecode Compiler"
- username: "dgp"
Ticket change [b477c0b87a] (rid 125041) by dgp on 2002-04-09 03:26:50:
- icomment:
Logged In: YES user_id=80530 I traced the problem to a compiler/linker mismatch. The Tcl library was compiled with gcc, but the program that embeds Tcl was compiled with the Sun Workshop compiler. That difference seems to cause the trouble. When I compiled both with the Sun compiler, everything worked fine. So, I do have a workaround, but it seems to me that compiler matching should not be necessary. That is, the shared libraries produced by Tcl's build process ought to be able to be linked into programs using any compiler -- at least on reasonable operating systems...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3593e214c0] (rid 106960) by msofer on 2002-04-26 19:50:08:
- icomment:
Logged In: YES user_id=148712 I don't even know where to start looking; anybody to whack me with a big clue-by-four?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [ac4680aa6c] (rid 101264) by andreas_kupries on 2002-04-26 23:47:54:
- icomment:
Logged In: YES user_id=75003 The missing thing could be that the tcl library was not linked against -lgcc, i.e. the gcc support library.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [11e487c53c] (rid 95218) by dgp on 2002-04-27 02:25:45:
- icomment:
Logged In: YES user_id=80530 Perhaps, but if additional libraries are required for successful static linking against the Tcl library, those libraries should be part of the TCL_LIBS definition in tclConfig.sh.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2f53f56bf2] (rid 93046) by dgp on 2002-04-27 02:31:36:
- icomment:
Logged In: YES user_id=80530 Tracing futher, it appears the root of the trouble is the #include <float.h>. Why does tclExecute.c need that header file?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8c8b771b7e] (rid 127759) by andreas_kupries on 2002-04-27 02:58:15:
- icomment:
Logged In: YES user_id=75003 Bytecompiled expressions ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [0d47062bfc] (rid 114334) by msofer on 2002-04-27 03:02:36:
- icomment:
Logged In: YES user_id=148712 Beats me; commenting out lines 20-24 compiles OK and passes the test suite on linux.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d552b7b592] (rid 123600) by dgp on 2002-04-27 03:30:20:
- icomment:
Logged In: YES user_id=80530 ditto on Soaris 8
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2f1957689e] (rid 92998) by msofer on 2002-04-27 05:09:40:
- icomment:
Logged In: YES user_id=148712 Those #include are in since the very first version on SF (1.1); what's more, compat/float.h has been empty since those days too! So: what is actually the point of #ifdef NO_FLOAT_H # include "../compat/float.h" #else # include <float.h> #endif Also, unix/tclUnixPort.h includes <float.h> to define FLT_MAX (used in generic/tclBinary.c) and FLT_MIN (unused); if float.h is not available, it tries <values.h>; if that is not available either, it defines default values that almost coincide with what I find in my /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/float.h Note that FLT_MAX is only used in [binary format], to represent too-large single-precision floats. So: what is really the point of <float.h> in tcl? Note: win/tclWinPort.h also includes <float.h>.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [4e66f9c3eb] (rid 127229) by msofer on 2002-06-05 01:57:14:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=148712 We could safely eliminate <float.h> everywhere in the unix branch if we make sure that FLT_MAX is defined properly in unix/tclUnixPort.h. I do not really know what a good generic definition for FLT_MAX would be. I wonder if the default defined in unix/tclUnixPort.h is OK for all platforms or it is just a "safe" default. Donal: do you know?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [933d2d821f] (rid 105783) by dkf on 2002-06-07 16:18:28:
- icomment:
Logged In: YES user_id=79902 Well, I've tried examining what the various definitions for FLT_MAX (and DBL_MAX) are on various platforms (Solaris/SPARC, Linux/ix86, and IRIX64 in both 32bit and 64-bit mode) and all report the same values: FLT_MAX=3.4028234663852886e+38 DBL_MAX=1.7976931348623157e+308 Examining the code, so long as "tclPort.h" is #included, we don't need to explicitly #include <float.h> anyway. But tclExecute.c is somewhat bizarre here. Will have a go at fixing it anyway.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [0c4068c5dc] (rid 114141) by dkf on 2002-06-07 17:42:48:
- closedate changed to: "2002-06-07T10:42:48"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 OK, I think tclExecute.c is now right; any faults now are probably to do with the build system and/or not running configure and/or something else which I don't understand. (Doesn't mean I understand what those error messages really are though! :^))
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [0af82ca6f2] (rid 113915) by dgp on 2002-06-27 03:36:07:
- icomment:
Logged In: YES user_id=80530 Re-opening this. I'm seeing the same problem with the 8.4b1 sources. Investigating...
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [c893ef168e] (rid 122127) by dgp on 2002-06-27 12:06:59:
- icomment:
Logged In: YES user_id=80530 The missing symbols are routines supplied by gcc for doing math on "long long" values. The implementation of these routines is in libgcc.a, so the linking of the embedding application can be completed by adding that library to those linked, as Andreas suggested before. Note that I see this problem with both gcc-2.95.2 and gcc-3.0.3. It is a new problem because of new "long long" code within Tcl, not because of a change in compiler. So, one approach to fix this would be to see that the appropriate -L... -lgcc options get added to the TCL_LIBS value in tclConfig.sh. Another might be to require embedders to use the TCL_CC compiler recorded in tclConfig.sh. Neither of those is really a satisfactory answer though, because it requires the embedder to use the same toolset as the library builder. It would be better if the binary Tcl and Tk libraries could be distributed in a binary distribution for embedding into applications possibly by a different toolset. So, it would be best to find some options to pass to the linker during the construction of libtcl8.4.so that force it to pull the math support code out of libgcc and put it directly into libtcl8.4.so. (I'm assuming that libgcc is LGPL). Anyone know linker options well enough to proceed along that path?
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "dgp"
- icomment:
Ticket change [4235a1d8b1] (rid 116326) by dkf on 2002-06-27 15:33:29:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=79902 Linker options are not my specialty.
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "53. Configuration and Build Tools"
- username: "dkf"
Ticket change [e10807e7db] (rid 87378) by dkf on 2002-06-27 17:17:28:
- icomment:
Logged In: YES user_id=79902 However, building with SunPro cc on Solaris should produce code that doesn't require these functions.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [fbed9c5d96] (rid 108143) by dgp on 2002-06-27 22:40:47:
- icomment:
Logged In: YES user_id=80530 Yes, of course. But that answer translates to "you cannot use gcc to build a binary distro of Tcl". The root of the problem is probably bad design choices in gcc, but if we can work around them it would be a good idea.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7261c5ce9b] (rid 100850) by dgp on 2002-06-28 02:18:22:
- title changed to: "gcc compiled Tcl library needs libgcc"
Ticket change [b12c8b9ffc] (rid 98108) by dgp on 2002-06-28 02:56:27:
- icomment:
Logged In: YES user_id=80530 OK, the linker options required are just to include libgcc among the items linked together to produce the Tcl shared library. I achieved success adding the appropriate -L... -lgcc to the MATH_LIBS, but that's not the right solution within the Makefile architecture. Can someone advise the better way?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2a02b7d04b] (rid 118481) by dgp on 2002-06-29 03:51:53:
- assignee changed to: "mdejong"
- icomment:
Logged In: YES user_id=80530 It appears that what must change is what gets run during the ${TCL_LIB_FILE} target. The key line is ${SHLIB_LD} -o $@ ${OBJS} ${LIBS} Perhaps {SHLIB_LD} needs to be some kind of invocation of gcc rather than /usr/ccs/bin/ld ? Or perhaps LIBS needs to include -L... -lgcc, but somehow, keep those additions out of the TCL_LIBS variable in tclConfig.sh - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [3343dbc1e0] (rid 106555) by rmax on 2002-07-01 22:37:52:
- icomment:
Logged In: YES user_id=124643 Just for completeness. It is allowed to link libgcc.a to binaries that are not GPL, or not even open source. The C file for libgcc.a contains a comment, that says: In addition to the permissions in the GNU General Public License, the Software Foundation gives you unlimited permission to link the compiled version of this file into combinations with other programs, and to distribute those combinations without any restriction coming from the use of this file. (The General Public License restrictions do apply in other respects; for example, they cover modification of the file, and distribution when not linked into a combine executable. - login: "rmax"
- mimetype: "text/plain"
- username: "rmax"
- icomment:
Ticket change [4a49107c1e] (rid 126513) by dkf on 2002-07-01 22:45:13:
- assignee changed to: "dkf"
- closedate changed to: "2002-07-01T15:45:13"
- closer changed to: "dkf"
- status changed to: "Closed"
Ticket change [031bec6aa8] (rid 119763) by dgp on 2004-11-18 01:59:19:
- icomment:
Logged In: YES user_id=80530 FWIW, this problem has shown up again on the HEAD.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [3889a9a839] (rid 112222) by dgp on 2004-11-18 02:28:10:
- assignee changed to: "dgp"
Ticket change [80cce4f22e] (rid 116930) by dgp on 2004-11-18 03:29:41:
- icomment:
Logged In: YES user_id=80530 broken in 8.4.8 too.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [a5746dec7a] (rid 110382) by dgp on 2004-11-18 03:35:02:
- priority changed to: "5 Medium"
Ticket change [af5d5e7f6c] (rid 97799) by dgp on 2004-11-18 03:35:03:
- icomment:
Logged In: YES user_id=80530 dropping priority. This is an unusual, anti-recommended configuration, and fixing it looks hard. Just pick one compiler and use it for all.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [600e1e0142] (rid 115927) by hobbs on 2007-02-10 01:31:32:
- closedate changed to: "2007-02-09T18:31:32"
- closer changed to: "hobbs"
- status changed to: "Pending"
Ticket change [a9fd16603d] (rid 99245) by sf-robot on 2007-02-24 10:20:10:
- closedate changed to: "2007-02-24T03:20:10"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"
Ticket change [4a20e98d09] (rid 126482) by dgp on 2007-10-05 02:16:32:
- icomment:
Logged In: YES user_id=80530 Originator: YES -static-libgcc option to the gcc linker might be a way out of this dilemma.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [90c519572a] (rid 120507) by dgp on 2008-04-15 22:55:25:
- closedate changed to: "2008-04-15T15:55:25"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: YES Can't reproduce with 8.4.19 and a modern Solaris/gcc combination.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- status changed to: "Pending"
- username: "dgp"
Ticket change [d31ee97cca] (rid 113641) by sf-robot on 2008-04-30 09:20:24:
- closedate changed to: "2008-04-30T02:20:24"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"