Skip to content
Tcl Source Code History Of Ticket ed982d0ec0
Login

History Of Ticket ed982d0ec0

Artifacts Associated With Ticket ed982d0ec0

  1. Ticket change [c6e9253e57] (rid 141174) by anonymous on 2015-02-08 05:00:49:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Really need some assistance.... Novice with Makefile, configure, ld etc.
      Tried over 10 times to build tcl.  It always ends:
      
      # pwd    
      /home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tcl8.6.3/unix
      # ls -la libtcl*
      -rwxr-xr-x    1 surfer   Internet    2773523 Feb 07 20:05 libtcl8.6.so
      -rw-r--r--    1 surfer   Internet       6105 Feb 07 20:03 libtclstub8.6.a
      # make
              gcc -DNDEBUG -O2  -pipe     tclAppInit.o  -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tcl8.6.3/unix -ltcl8.6 libtc
      lstub8.6.a -ldl -lz  -lpthread -lc -lm   -L/opt/alinux/lib -o tclsh
      ld: 0706-006 Cannot find or open library file: -l tcl8.6
              ld:open(): A file or directory in the path name does not exist.
      collect2: error: ld returned 255 exit status
      make: 1254-004 The error code from the last command is 1.
      
      
      I do not know how to tell the loader where the library or file it is looking for is located.  Assuming that it is looking for libtcl8.6.so or libtclstub8.6.a.
      
      
      Configuration:
      IBM pSeries system running AIX 7.1
      I have use GNU make and AIX make
      Only used AIX ld
      m4 seems to always go to AIX m4
      I do have a linux version of m4 in /opt/freeware/bin/m4
      configure run so that install will be into /opt/alinux
      
    5. foundin initialized to: "tcl8.6.3"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "f0cf5eb68cc592e51c0e897740dbcaa82158ce74"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "69. Other"
    15. title initialized to: "problem with make run"
    16. type initialized to: "Support"
  2. Ticket change [cbdb518d02] (rid 141180) by dgp on 2015-02-10 17:02:35:

    1. icomment:
      
      This is not an answer, but a bit of shared experience.
      
      Whenever I've needed to build Tcl on one these "Big Iron"
      unix systems (Solaris, IRIX, AIX, HPUX,...), I have found
      gcc to be completely unreliable.  I've always had to fall
      back to whatever compiler and toolchain the OS maker
      provides/sells to compile C code.
      
      Now, I haven't tried to do anything like this in many many
      years.  If you regularly have success building with gcc
      on your AIX system, and it's only Tcl that's failing, then
      you may be right that Tcl's build system needs tweaking
      to cover the case.
      
      But if this is a rare building event on this system for you as
      well, I think I'd avoid bashing my head on this particular
      brick wall and shift over to whatever AIX uses for its "cc".
      
      Other are welcome to register their disagreement.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. subsystem changed to: "53. Configure and Build Tools"
    5. title changed to: "Failed tclsh link on AIX."
  3. Ticket change [0f343693b9] (rid 141181) by anonymous on 2015-02-11 01:58:16:

    1. icomment:
      Hope I am responding correctly this time.
      I do not have the IBM c compiler.
      I have used gcc for many years and have never had a problem with gcc.
      What I was trying to report via my last comment was that after reading the
      "ld" man page a number of times I think I figured out what was wrong.
      
      First I should explain that I am not a software developer and definitely
      not a knowledgeable person when it comes to make or configure.
      All I know is that configure creates the Makefile that make used to
      build the distribution.
      
      What I found when I ran make (gmake) was that the command it was trying to 
      execute seems to be a call to ld; but the parameters that were being passed 
      had an error in it. The -L correctly pointed to the build directory; but 
      the -l had the wrong library name in it.  I believe the name used in the
      -l was the shared object.  And the addition file specified was the shared
      library.  In any case.  When I made this substitution it corrected the 
      problem and then I could run make to it conclusion.
      I assume things worked OK because when I did make test all test
      ran to completion with out any errors.
      
      When I tried to compile tk I encountered the same problem I had when compiling
      tcl; but with the added problem that the tk makes use of the tcl share library and object.
      I also encountered a problem with and include <tcl.h> statement in the files
      I mentioned in my previous update.  Not sure just what configure was supposed
      to do about adjusting the include to point to the correct tcl.h file; but it
      did not make any changes and thus the make run tried to use the tcl.h that 
      was in /usr/include..  I forget; but I did tell configure where the tcl that
      I wanted to use was located.  Some how this information was not reflected
      in the make (Makefile) run.  Once I change each of the files that contained
      the include <tcl.h> statement to include </opt/alinux/include/tcl.h> the
      make ran to completion without further problems.
      
      The problems I encountered do not seem to be gcc or ld problems.  They
      seem to be problems resulting from a problem in the configure run or
      maybe the source code files.  As far as I can tell gcc and ld did exactly
      what they were instructed to do.  Thus the error.
      
      As to my other problem.
      Sorry to say I did not read the README file fully.  However; when I did
      I noticed that there was a comment that said that some of the test might
      fail because they were no longer valid.  Since all the test that were
      run except for one ran successfully I am going to assume that the one that
      failed is no longer valid. (I forget the name of the test...something
      with box in it I believe.  I am currently on a different AIX server.)
      
      If I have any more problems I will post another message asking for help.
      You may mark this ticked closed or if you want any addition information
      ask and I will try to provide the requested information.
      
      Thanks for responding!
      Bye,
      Dwight
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  4. Ticket change [05f5dde34a] (rid 141182) by dgp on 2015-02-11 03:40:18:

    1. icomment:
      
      If you could record here the edits you needed to make
      to the Makefile to make things work, then there's a chance
      we could make fixes to configure so that it stops getting
      it wrong.  Thanks for whatever you can offer.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [96d64d2af2] (rid 141194) by anonymous on 2015-02-12 03:55:05:

    1. icomment:
      Hi,
        Since I do not know how to modify Makefiles or configure files, I
      just modified the source code file or the make command resulting from the
      Makefile.
        Some one that know what configure is doing to create the Makefile
      will have to look at what I did to the command to
      figure out how to fix the configure file to solve the problem.
      
        What I did appears below.
      
      ***********************
      *    tcl make error   *
      ***********************
      ####Problem when doing a "make"
      
      gcc -DNDEBUG -O2  -pipe     tclAppInit.o \
              -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tcl8.6.3/unix -ltcl8.6 libtclstub8.6.a -ldl -lz  -lpthread -lc -lm  \
              -L/usr/local/lib -o tclsh
      ld: 0706-006 Cannot find or open library file: -l tcl8.6
              ld:open(): A file or directory in the path name does not exist.
      collect2: error: ld returned 255 exit status
      Makefile:647: recipe for target 'tclsh' failed
      gmake: *** [tclsh] Error 1
      
      
      BAD make command:
      gcc -DNDEBUG -O2  -pipe     tclAppInit.o \
      -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tcl8.6.3/unix -ltcl8.6 libtclstub8.6.a -ldl -lz  -lpthread -lc -lm  \
      -L/usr/local/lib -o tclsh
      
      GOOD make command:
      gcc -DNDEBUG -O2  -pipe     tclAppInit.o \
      -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tcl8.6.3/unix -ltclstub8.6 libtcl8.6.so  -ldl -lz  -lpthread -lc -lm  \
      -L/usr/local/lib -o tclsh
      
      ####Same kind of problem when doing a "make test"
      
      ***********************
      *    tk make error    *
      ***********************
      Must fix the include <tcl.h> in the following files:
      (Change tcl.h to /opt/alinux/include/tcl.h)
              generic/tk.h
              generic/tkIntXlibDecls.h
              generic/ttk/ttkElements.c
              generic/ttk/ttkLabel.c
              generic/ttk/ttkTagSet.c
      
      ####Problem when doing a "make"
      BAD:
      gcc -O2  -pipe     tkAppInit.o -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tk8.6.3/unix -ltk8.6 \
      -L/opt/alinux/lib -ltcl8.6  -lpthread -lc  -lX11 -lXext -ldl -lz  -lpthread -lc -lm  -L/opt/alinux/lib -o wish
      Good:
      gcc -O2  -pipe     tkAppInit.o -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tk8.6.3/unix -ltkstub8.6 libtk8.6.so \
      -L/opt/alinux/lib -ltclstub8.6 /opt/alinux/lib/libtcl8.6.so \
      -lpthread -lc  -lX11 -lXext -ldl -lz  -lpthread -lc -lm  -L/opt/alinux/lib -o wish
      
      ####Same kind of problem when doing a "make test"
      BAD:
      gcc -O2  -pipe     tkTestInit.o tkTest.o tkSquare.o tkOldTest.o  libtkstub8.6.a -L/opt/alinux/lib -ltclstub8.6 \
      -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tk8.6.3/unix -ltk8.6 \
      -L/opt/alinux/lib -ltcl8.6  -lpthread -lc  -lX11 -lXext -ldl -lz  -lpthread -lc -lm 
      -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tk8.6.3/unix:/opt/alinux/lib -o tktest
      Good:
      gcc -O2  -pipe     tkTestInit.o tkTest.o tkSquare.o tkOldTest.o  libtk8.6.so -L/opt/alinux/lib -ltclstub8.6 \
      -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tk8.6.3/unix -ltkstub8.6 \
      -L/opt/alinux/lib -ltclstub8.6 /opt/alinux/lib/libtcl8.6.so  -lpthread -lc  -lX11 -lXext -ldl -lz  -lpthread -lc -lm  \
      -L/home/surfer/DownLoadLFNs/HTML/NEWS/BuildFirefox/tk8.6.3/unix:/opt/alinux/lib -o tktest
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "Anonymous - Dwight"
  6. Ticket change [7c2a9ad465] (rid 141199) by dgp on 2015-02-12 18:53:53:

    1. icomment:
      
      Can you please report the sequence you originally used
      to attempt to build Tcl, etc. that failed?  That is, any command
      line options given to configure, etc.  Also what build directory
      you were working in.
      
      For that matter, a simple transcript of your failing session might
      be the most reliable way to transmit to us all the information that
      might be relevant.  That might get large, so either an attachment
      or a link to a pastebin might be best.  Thanks.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  7. Add attachment "TclBuild" [5838e88220] (rid 141200) by anonymous on 2015-02-14 03:55:52.

  8. Ticket change [1e7356441d] (rid 141253) by dgp on 2015-02-25 17:48:10:

    1. icomment:
      
      Thanks for the transcript.
      
      I don't have an AIX box myself to try reproduction on,
      so I'm pretty much just tossing out a guess.
      
      I see that you have
      
      $ LD=ld
      
      Have you tried a build where you leave LD undefined?
      
      Or a build where you set
      
      $ LD=gcc
      
      ?
      
      Apologies if these are dumb suggestions.
      
      The evidence points to your link step not knowing
      how to properly interpret an argument like -ltcl8.6
      
      Thanks for testing and reporting what you can.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  9. Ticket change [fd539bd842] (rid 141269) by anonymous on 2015-02-27 02:12:23:

    1. icomment:
      I have not tried to build tcl/tk with out setting LD equal to ld.
      I have never set LD=gcc.  As far as I know gcc calls ld to do any kind 
      of linking.  I do not have the GNU ld installed on my system.  I only
      have IBM ld installed on my system.
      
      The problem that I experience was that either configure/gmake was
      causing an incorrect -L and -l specification to be generated.
      From the information I got by reading the man pages for ld
      -L is used to specify a directory where libraries and .so files
      can be found.  The -l specifies a name of a particular library.
      
      During the gmake run a -l specification is being used to define
      a .so file and not a library.  Thus when ld tried to find the 
      library it is unable to do so and is thus unable to complete the
      link operation.
      
      All I did was to change the command to put the correct library
      name in the -l specification and to add the correct .so file to the
      command.
      That is; I changed -ltcl8.6 to -ltclstub8.6
      and libtclstub8.6.a to libtcl8.6.so.
      (If tclstub8.6 should really be tcl8.6 then there are other
      problem in the configure/gmake output.)
      
      The correction to the tk gmake run is the same except that
      the tk gmake also requires that the correct tcl changes also
      be added to the command.
      
      Bye,
      Dwight
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  10. Ticket change [759ac65f03] (rid 141270) by dgp on 2015-02-27 12:52:26:

    1. assignee changed to: "stwo"
    2. icomment:
      
      Seeking other opinions on this.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  11. Ticket change [56c657c373] (rid 141389) by dkf on 2015-03-17 11:36:27:

    1. icomment:
      It looks like the linker that's being used doesn't know how to link with the sort of shared libraries that are being produced, or at least that it expects different shared lib suffixes to the conventional <tt>.so</tt> and this is something I could definitely believe. Now, I don't know AIX at all, but googling indicates that <a href="http://seriousbirder.com/blogs/aix-shared-and-static-libraries-explained/">the linker might need the <tt>-brtl</tt> flag passing to it</a>. I can't vouch for the accuracy of that site, and <a href="http://stackoverflow.com/questions/15929917/linking-against-a-shared-library-on-aix">getting it through the gcc frontend will require it to be written as <tt>-Wl,-brtl</tt></a>, but maybe it will help?<p>Or maybe I'm dead wrong! I don't know AIX or have access to it at all.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  12. Add attachment "AIXldMANpages" [c5558e2eb1] (rid 141398) by anonymous on 2015-03-18 01:57:05.

  13. Ticket change [e9eb666b59] (rid 148538) by dkf on 2016-09-01 16:11:24:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. subsystem changed to: "53. Configuration and Build Tools"