Ticket UUID: | 450725 | |||
Title: | Fix Build for FreeBSD | |||
Type: | Patch | Version: | None | |
Submitter: | dinoex | Created on: | 2001-08-14 08:13:08 | |
Subsystem: | 53. Configure and Build Tools | Assigned To: | mdejong | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2001-09-11 05:49:55 | |
Resolution: | Fixed | Closed By: | mdejong | |
Closed on: | 2001-09-10 22:49:55 | |||
Description: |
--- tcl.m4.orig Fri Apr 6 20:51:46 2001 +++ tcl.m4 Tue Aug 14 09:24:56 2001 @@ -890,8 +890,11 @@ SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="-export-dynamic" + LDFLAGS="" LD_SEARCH_FLAGS="" + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + TCL_LIB_VERSIONS_OK=nodots ;; Rhapsody-*|Darwin-*) SHLIB_CFLAGS="-fno-common" | |||
User Comments: |
mdejong added on 2001-09-11 05:49:55:
Logged In: YES user_id=90858 I did a commit of the patch to remove . characters from the library names. The other changes seem to be unrelated to this particular problem and can therefore be handled with another patch. mdejong added on 2001-09-10 00:46:14: File Added - 10563: nodots.patch Logged In: YES user_id=90858 I don't really see the need for many of these changes. For example, why version the tcl with an elf .so.1 suffix when the "84" version string already appears in the library name? I would be willing to check in the attached patch, it simply removes the dots from the library name. dinoex added on 2001-09-09 23:05:45: Logged In: YES user_id=181729 Oh yes, I see. In the FreeBSD Ports COllection WH have a Patch for the Makefile so it found the lib. The patch is from the previous maintainer, I haven'd reviewed all of it yet. dinoex added on 2001-09-09 23:03:31: File Added - 10557: patch-aa mdejong added on 2001-09-08 11:43:29: Logged In: YES user_id=90858 Ok, I see what you mean WTR the . in lib names. Trouble is, I run into compile problems related to the shared library name when I add your change. As far as I can tell, things compile ok on this FreeBSD 4.3 machine I tested on before adding your patch. Here is the compiler error that shows up after adding your patch. % make ... rm -f libtcl84g.so.1 ld -Bshareable -x -o libtcl84g.so.1 regcomp.o regexec.o regfree.o regerror.o tclAlloc.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompExpr.o tclCompile.o tclDate.o tclEncoding.o tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclListObj.o tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o tclObj.o tclPanic.o tclParse.o tclParseExpr.o tclPipe.o tclPkg.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o tclResolve.o tclResult.o tclScan.o tclStringObj.o tclThread.o tclStubInit.o tclStubLib.o tclTimer.o tclUtf.o tclUtil.o tclVar.o tclMtherr.o tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o tclUnixFile.o tclUnixPipe.o tclUnixSock.o tclUnixTime.o tclUnixInit.o tclUnixThrd.o tclUnixNotfy.o tclLoadDl.o : libtcl84g.so.1 gcc -pipe tclAppInit.o -L/home/users/m/md/mdejong/project/build/freebsd -ltcl84g -lm -lc -o tclsh /usr/libexec/elf/ld: cannot find -ltcl84g *** Error code 1 Now, if I change the name of the output lib to "libtcl84g.so" it links just fine. Thing is, that does not create a "libtcl84g.so.1" symlink like the system installed one. $ pwd /home/users/m/md/mdejong/project/install/freebsd/lib bash-2.05$ ls -la total 1852 drwxr-xr-x 3 mdejong users 4096 Sep 7 21:38 . drwxr-xr-x 6 mdejong users 4096 Sep 7 21:38 .. -r-xr-xr-x 1 mdejong users 1792525 Sep 7 21:38 libtcl84g.so -rw-r--r-- 1 mdejong users 72108 Sep 7 21:38 libtclstub84g.a drwxr-xr-x 8 mdejong users 4096 Sep 7 21:38 tcl8.4 -rw-r--r-- 1 mdejong users 7024 Sep 7 21:38 tclConfig.sh (The system install) $ ls -la /usr/local/lib/libtcl83* -r-xr-xr-x 1 root wheel 784262 Apr 18 14:09 /usr/local/lib/libtcl83.a lrwxrwxrwx 1 root wheel 13 Jun 5 07:34 /usr/local/lib/libtcl83.so -> libtcl83.so.1 -r-xr-xr-x 1 root wheel 555384 Apr 18 14:09 /usr/local/lib/libtcl83.so.1 Also, what does removing the -export-dynamic flag from the LDFLAGS do? Someone must have added that for some reason. dinoex added on 2001-09-08 09:55:55: File Added - 10522: patch-tcl.m4 Logged In: YES user_id=181729 TRy to add the patch dinoex added on 2001-09-08 09:52:56: Logged In: YES user_id=181729 FreeBSD don't use dotted Shared Libs since it moved from aout (3.x, 4.x, 5.x ). ldd /usr/local/bin/wish8.3 /usr/local/bin/wish8.3: libtk83.so => /usr/local/lib/libtk83.so libtcl83.so => /usr/local/lib/libtcl83.so libX11.so.6 => /usr/X11R6/lib/libX11.so.6 libm.so.2 => /usr/lib/libm.so.2 libc.so.4 => /usr/lib/libc.so.4 libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 I think the patch make sure the lib names gets installed with the right extensions. mdejong added on 2001-09-08 06:40:08: Logged In: YES user_id=90858 Dirk, could you explain what problem this patch is fixing and how exactly it fixes it? Also, could you attach the patch instead of pasting it into the text area? You should also make the patch from the current CVS source so that it applies cleanly. |