Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labltk #2597

Closed
vicuna opened this issue Oct 25, 2000 · 5 comments
Closed

labltk #2597

vicuna opened this issue Oct 25, 2000 · 5 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 25, 2000

Original bug ID: 211
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Nicolas Ferre
Version: OCaml-3.00
OS: AIX 4.3.3.0.
Submission from: syrah.sciences.uhp-nancy.fr (194.254.100.10)

Trying to execute ./configure, I have the following message :
Configuring LablTk...
tcl.h version 8.3 found.
tk.h found.
Tcl library not found.
Configuration failed, LablTk will not be built.

Then follows the summary.

Tcl/Tk libraries are correctly stalled on my machine.
In /usr/local/lib, there are :
libtcl8.3.exp, libtcl8.3.so, libtclstub8.3.a,
libtk8.3.exp, libtk8.3.so, libtkstub8.3.a files and
tcl8.3, tk8.3 directories.

I have tried ./configure -tklibs "-L/usr/local/lib -ltk8.3 -ltcl8.3"
but it doesn't work too.

Following the verbose report:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
runtest: gcc -o tst $:
hasgot sigaction sigprocmask: gcc -o tst hasgot.c
hasgot strerror: gcc -o tst hasgot.c
hasgot times: gcc -o tst hasgot.c
hasgot tgetent tgetstr tgetnum tputs: gcc -o tst hasgot.c
ld: 0711-317 ERROR: Undefined symbol: .tgetent
ld: 0711-317 ERROR: Undefined symbol: .tgetstr
ld: 0711-317 ERROR: Undefined symbol: .tgetnum
ld: 0711-317 ERROR: Undefined symbol: .tputs
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
hasgot -lcurses tgetent tgetstr tgetnum tputs: gcc -o tst hasgot.c
-lcurses
hasgot socket socketpair bind listen accept connect: gcc -o tst hasgot.c
-lcurses
hasgot -i sys/socket.h -t socklen_t: gcc -o tst hasgot.c -lcurses
hasgot -i unistd.h: gcc -o tst hasgot.c -lcurses
hasgot -i sys/types.h -i dirent.h: gcc -o tst hasgot.c -lcurses
hasgot rewinddir: gcc -o tst hasgot.c -lcurses
hasgot lockf: gcc -o tst hasgot.c -lcurses
hasgot mkfifo: gcc -o tst hasgot.c -lcurses
hasgot getcwd: gcc -o tst hasgot.c -lcurses
hasgot getwd: gcc -o tst hasgot.c -lcurses
hasgot getpriority setpriority: gcc -o tst hasgot.c -lcurses
hasgot -i sys/types.h -i utime.h: gcc -o tst hasgot.c -lcurses
hasgot utime: gcc -o tst hasgot.c -lcurses
hasgot utimes: gcc -o tst hasgot.c -lcurses
hasgot dup2: gcc -o tst hasgot.c -lcurses
hasgot fchmod fchown: gcc -o tst hasgot.c -lcurses
hasgot truncate ftruncate: gcc -o tst hasgot.c -lcurses
hasgot select: gcc -o tst hasgot.c -lcurses
hasgot -i sys/types.h -i sys/select.h: gcc -o tst hasgot.c -lcurses
hasgot symlink readlink lstat: gcc -o tst hasgot.c -lcurses
hasgot waitpid: gcc -o tst hasgot.c -lcurses
hasgot wait4: gcc -o tst hasgot.c -lcurses
ld: 0711-317 ERROR: Undefined symbol: .wait4
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
hasgot -i limits.h: gcc -o tst hasgot.c -lcurses
runtest: gcc -o tst $: -lcurses
hasgot -i termios.h: gcc -o tst hasgot.c -lcurses
hasgot tcgetattr tcsetattr tcsendbreak tcflush tcflow: gcc -o tst hasgot.c
-lcurses
runtest: gcc -o tst $: -lcurses
hasgot setitimer: gcc -o tst hasgot.c -lcurses
hasgot gethostname: gcc -o tst hasgot.c -lcurses
hasgot -i sys/utsname.h: gcc -o tst hasgot.c -lcurses
hasgot uname: gcc -o tst hasgot.c -lcurses
hasgot gettimeofday: gcc -o tst hasgot.c -lcurses
hasgot mktime: gcc -o tst hasgot.c -lcurses
hasgot setsid: gcc -o tst hasgot.c -lcurses
hasgot putenv: gcc -o tst hasgot.c -lcurses
hasgot -i locale.h: gcc -o tst hasgot.c -lcurses
hasgot setlocale: gcc -o tst hasgot.c -lcurses
hasgot -ldl dlopen: gcc -o tst hasgot.c -lcurses -ldl
hasgot -i sys/types.h -i sys/mman.h: gcc -o tst hasgot.c -lcurses
hasgot mmap munmap: gcc -o tst hasgot.c -lcurses
hasgot -i tk.h: gcc -o tst hasgot.c -lcurses
hasgot -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses -lm -ldl
ld: 0711-317 ERROR: Undefined symbol: .Tcl_DoOneEvent
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
hasgot -ltcl8.3 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl8.3 -lm -ldl
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
hasgot -ltcl83 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl83 -lm -ldl
collect2: Library libtcl83 not found
hasgot -L/usr/local/lib -ltcl8.3 -lm -ldl Tcl_DoOneEvent: gcc -o tst
hasgot.c -lcurses -L/usr/local/lib -ltcl8.3 -lm -ldl
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
hasgot -L/usr/local/lib -ltcl83 -lm -ldl Tcl_DoOneEvent: gcc -o tst
hasgot.c -lcurses -L/usr/local/lib -ltcl83 -lm -ldl
collect2: Library libtcl83 not found

Perhaps I miss something with Tcl/Tk installation. What are the libraries needed
for labltk ?
Thanks for your help.

Nicolas

@vicuna
Copy link
Author

vicuna commented Oct 26, 2000

Comment author: administrator

The relevant part of the log is:

hasgot -ltcl8.3 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl8.3 -lm -ldl
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
hasgot -ltcl83 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl83 -lm -ldl
collect2: Library libtcl83 not found

You say that you have /usr/local/lib/libtcl8.3.so, and indeed gcc seems to have
found it. You can contrast it with the second call looking for libtcl83.so,
where collect2 directly fails.
The problem seems to be with ld itself, which cannot open libtcl8.3.so.
That's pretty strange. Can you try to make a small test.c, with just
main () { Tcl_DoOneEvent(); }
and compile it
gcc test.c -ltcl8.3
and, if you have another C compiler
cc test.c -L/usr/local/lib -ltcl8.3
That may give a hint.

Jacques Garrigue

@vicuna
Copy link
Author

vicuna commented Oct 26, 2000

Comment author: administrator

Jacques Garrigue wrote:

The relevant part of the log is:

hasgot -ltcl8.3 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl8.3 -lm -ldl
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
hasgot -ltcl83 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl83 -lm -ldl
collect2: Library libtcl83 not found

You say that you have /usr/local/lib/libtcl8.3.so, and indeed gcc seems to have
found it. You can contrast it with the second call looking for libtcl83.so,
where collect2 directly fails.
The problem seems to be with ld itself, which cannot open libtcl8.3.so.
That's pretty strange. Can you try to make a small test.c, with just
main () { Tcl_DoOneEvent(); }
and compile it
gcc test.c -ltcl8.3
and, if you have another C compiler
cc test.c -L/usr/local/lib -ltcl8.3
That may give a hint.

    Jacques Garrigue

Ok, here's the result :

<Niko 5> gcc test.c -ltcl8.3
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
<Niko 5> cc test.c -L/usr/local/lib -ltcl8.3
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
<Niko 5> which ld
/usr/bin/ld
<Niko 5> ls /usr/local/lib/libt*
/usr/local/lib/libtcl8.3.exp /usr/local/lib/libtk8.3.exp
/usr/local/lib/libtcl8.3.so /usr/local/lib/libtk8.3.so
/usr/local/lib/libtclstub8.3.a /usr/local/lib/libtkstub8.3.a

It seems to be ld that goes wrong. What do you think about it ?

--

Nicolas FERRE Tel : 03.83.91.20.00. poste 35.52.
Fax : 03.83.91.25.30.
Laboratoire de Chimie Theorique
Universite Henri Poincare Nancy 1
BP 239 E-mail : ferre@lctn.u-nancy.fr
54506 VANDOEUVRE-LES-NANCY Cedex
FRANCE

   http://www.lctn.u-nancy.fr/Etudiants/Nicolas.Ferre.html/


<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

Jacques Garrigue wrote:
The relevant part of the log is:
> hasgot -ltcl8.3 -lm -ldl Tcl_DoOneEvent: gcc   -o tst hasgot.c -lcurses
> -ltcl8.3 -lm -ldl
> ld: 0706-006 Cannot find or open library file: -l tcl8.3
>  ld:open(): A file or directory in the path name does not exist.
>  collect2: ld returned 255 exit status
>  hasgot -ltcl83 -lm -ldl Tcl_DoOneEvent: gcc   -o tst hasgot.c -lcurses
> -ltcl83 -lm -ldl
> collect2: Library libtcl83 not found

You say that you have /usr/local/lib/libtcl8.3.so, and indeed gcc seems to have
found it. You can contrast it with the second call looking for libtcl83.so,
where collect2 directly fails.
The problem seems to be with ld itself, which cannot open libtcl8.3.so.
That's pretty strange. Can you try to make a small test.c, with just
        main () { Tcl_DoOneEvent(); }
and compile it
        gcc test.c -ltcl8.3
and, if you have another C compiler
        cc test.c -L/usr/local/lib -ltcl8.3
That may give a hint.

        Jacques Garrigue

Ok, here's the result :

<Niko 5> gcc test.c -ltcl8.3
ld: 0706-006 Cannot find or open library file: -l tcl8.3
 ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
<Niko 5> cc test.c -L/usr/local/lib -ltcl8.3
ld: 0706-006 Cannot find or open library file: -l tcl8.3
 ld:open(): A file or directory in the path name does not exist.
<Niko 5> which ld
/usr/bin/ld
<Niko 5> ls /usr/local/lib/libt*
/usr/local/lib/libtcl8.3.exp     /usr/local/lib/libtk8.3.exp
/usr/local/lib/libtcl8.3.so      /usr/local/lib/libtk8.3.so
/usr/local/lib/libtclstub8.3.a   /usr/local/lib/libtkstub8.3.a
 

It seems to be ld that goes wrong. What do you think about it ?

-- 
---------------------------------------------------------------------------
Nicolas FERRE                            Tel : 03.83.91.20.00. poste 35.52.
                                         Fax : 03.83.91.25.30.
Laboratoire de Chimie Theorique
Universite Henri Poincare Nancy 1
BP 239                                   E-mail : ferre@lctn.u-nancy.fr
54506 VANDOEUVRE-LES-NANCY Cedex
FRANCE

       http://www.lctn.u-nancy.fr/Etudiants/Nicolas.Ferre.html/
---------------------------------------------------------------------------


 



@vicuna
Copy link
Author

vicuna commented Oct 30, 2000

Comment author: administrator

Jacques Garrigue wrote:

The relevant part of the log is:

hasgot -ltcl8.3 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl8.3 -lm -ldl
ld: 0706-006 Cannot find or open library file: -l tcl8.3
ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status
hasgot -ltcl83 -lm -ldl Tcl_DoOneEvent: gcc -o tst hasgot.c -lcurses
-ltcl83 -lm -ldl
collect2: Library libtcl83 not found

You say that you have /usr/local/lib/libtcl8.3.so, and indeed gcc seems to have
found it. You can contrast it with the second call looking for libtcl83.so,
where collect2 directly fails.
The problem seems to be with ld itself, which cannot open libtcl8.3.so.
That's pretty strange. Can you try to make a small test.c, with just
main () { Tcl_DoOneEvent(); }
and compile it
gcc test.c -ltcl8.3
and, if you have another C compiler
cc test.c -L/usr/local/lib -ltcl8.3
That may give a hint.

    Jacques Garrigue

OK, I have fixed the problem.
This is due to dynamic linkage (libtcl8.3.so)
Since AIX4.2, to invoke this one, you have to pass the -brtl (for Run-time linker)
option to the compiler.
So the solution is
./configure -cc "xlC -brtl"
And that works.

--

Nicolas FERRE Tel : 03.83.91.20.00. poste 35.52.
Fax : 03.83.91.25.30.
Laboratoire de Chimie Theorique
Universite Henri Poincare Nancy 1
BP 239 E-mail : ferre@lctn.u-nancy.fr
54506 VANDOEUVRE-LES-NANCY Cedex
FRANCE

   http://www.lctn.u-nancy.fr/Etudiants/Nicolas.Ferre.html/

@vicuna
Copy link
Author

vicuna commented Oct 30, 2000

Comment author: administrator

OK, I have fixed the problem.
This is due to dynamic linkage (libtcl8.3.so)
Since AIX4.2, to invoke this one, you have to pass the -brtl (for Run-time linker)
option to the compiler.
So the solution is
./configure -cc "xlC -brtl"
And that works.

I see. Caml looks for -ldl (Linux systems), but not yet for -brtl.
By the way, the bytecode interpreter is generally faster when compiled
with gcc. You may try -cc "gcc -Wl,-brtl" to see if this works.

Jacques Garrigue

@vicuna
Copy link
Author

vicuna commented Nov 2, 2000

Comment author: administrator

Problems with AIX and non-standard dynamic linking. Could perhaps be addressed
in "configure" script.

@vicuna vicuna closed this as completed Nov 2, 2000
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant