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

Re: Failing to link in native mode on sun4 arch #2587

Closed
vicuna opened this issue Oct 16, 2000 · 4 comments
Closed

Re: Failing to link in native mode on sun4 arch #2587

vicuna opened this issue Oct 16, 2000 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 16, 2000

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

Bug description

Hi,

Thank you for your message to the Caml mailing list.

However your message seems to be a bug report; hence I send it to the
relevant mailing list

caml-bugs@inria.fr

Thank again for your interest in Caml.

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/

Hello,

I'm trying to build an ocaml program with the native compiler. Within
this ocaml program is included two C libraries.

I can successfully compiling and linking this program under x86 arch
with the native compiler.

However, under sun4 arch (Solaris 5.7), linking step fails:

ocamlc -o test_bdd -g -custom test_bdd.cmo /udd/mperin/csgChecker/ocaml-bdd/ml-bdd/bdd_interface.o /udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libbdd.a /udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libmem.a
/udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libbdd.a: could not read symbols: File format not recognized
Error while building custom runtime system

I've never seen this error before. I think it is linked to some
misbehavior with the C compiler (gcc) and/or the linker.

I've recompiled the libraries (libmem.a and libbdd.a) on this specific
machine with the same compiler.

Is anybody can see where am I wrong?

Here is more info on ocaml and gcc:

** Configuration summary **

Directories where Objective Caml will be installed:
binaries.................. /usr/local/bin
standard library.......... /usr/local/lib/ocaml
manual pages.............. /usr/local/man/man1 (with extension .1)
Configuration for the bytecode compiler:
C compiler used........... gcc
options for compiling..... -fno-defer-pop -Wall -Wno-unused
options for linking....... -lcurses -lnsl -lsocket -lm
Configuration for the native-code compiler:
hardware architecture..... sparc
OS variant................ solaris
C compiler used........... gcc
options for compiling..... -Wall -Wno-unused
options for linking....... -lcurses -lnsl -lsocket -lm
assembler ................ $(AS)
preprocessed assembler ... gcc -c -DSYS_$(SYSTEM)
profiling with gprof ..... not supported
Source-level replay debugger: supported
Configuration for the external libraries:
libraries supported ...... unix str num dynlink bigarray threads graph dbm
The "num" library:
target architecture ...... supersparc-solaris
The "graph" library:
options for compiling .... -I/usr/local/X11R6/include
options for linking ...... -ccopt -L/usr/local/X11R6/lib -cclib -lX11
The "labltk" library: configuration failed

usinagaz(dmentre):/tmp/dmentre [10] gcc -v tmp.c
Reading specs from /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/specs
gcc version 2.8.1
/usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) tmp.c /var/tmp/cch6aGFq.i
GNU CPP version 2.8.1 (sparc)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/gcc-2.8.1/sparc-sun-solaris2.7/include
/usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/include
/usr/include
End of search list.
/usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/cc1 /var/tmp/cch6aGFq.i -quiet -dumpbase tmp.c -version -o /var/tmp/cch6aGFq.s
GNU C version 2.8.1 (sparc-sun-solaris2.7) compiled by GNU C version 2.8.1.
/usr/local/gcc-2.8.1/sparc-sun-solaris2.7/bin/as -V -Qy -s -o /var/tmp/cch6aGFq1.o /var/tmp/cch6aGFq.s
GNU assembler version 2.9.1 (sparc-sun-solaris2.4), using BFD version 2.9.1
/usr/local/gcc-2.8.1/sparc-sun-solaris2.7/bin/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/crt1.o /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/crti.o /usr/ccs/lib/values-Xa.o /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/crtbegin.o -L/usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1 -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/gcc-2.8.1/lib /var/tmp/cch6aGFq1.o -lgcc -lc -lgcc /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/crtend.o /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/crtn.o
GNU ld version 2.9.1 (with BFD 2.9.1)
Supported emulations:
elf32_sparc

--
David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/
Opinions expressed here are only mine.

@vicuna
Copy link
Author

vicuna commented Nov 2, 2000

Comment author: administrator

David,

I'm trying to build an ocaml program with the native compiler. Within
this ocaml program is included two C libraries.

I can successfully compiling and linking this program under x86 arch
with the native compiler.

However, under sun4 arch (Solaris 5.7), linking step fails:

ocamlc -o test_bdd -g -custom test_bdd.cmo
/udd/mperin/csgChecker/ocaml-bdd/ml-bdd/bdd_interface.o
/udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libbdd.a
/udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libmem.a
/udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libbdd.a: could not read
symbols:
File format not recognized
Error while building custom runtime system

I've never seen this error before. I think it is linked to some
misbehavior with the C compiler (gcc) and/or the linker.

Je ne peux pas reproduire le probleme, et encore moins le comprendre.
Cela ressemble en effet a un probleme avec le linker de Solaris, ou peut-etre
aussi un probleme NFS (si la libbdd.a est sur une partition montee par NFS).

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Nov 2, 2000

Comment author: administrator

Cannot reproduce

@vicuna vicuna closed this as completed Nov 2, 2000
@vicuna
Copy link
Author

vicuna commented Nov 4, 2000

Comment author: administrator

Xavier Leroy caml-bugs@pauillac.inria.fr writes:

/udd/mperin/csgChecker/cmu-bdd/run/lib/sun4/libbdd.a: could not read
symbols:
File format not recognized
Error while building custom runtime system

I've never seen this error before. I think it is linked to some
misbehavior with the C compiler (gcc) and/or the linker.

Je ne peux pas reproduire le probleme, et encore moins le comprendre.
Cela ressemble en effet a un probleme avec le linker de Solaris, ou

Je viens de me rendre compte que la bibliothèque libbdd.a était compilée
par le compilo de Sun, alors que le compilo ocaml utilise gcc 2.8.1. Le
problème vient peut-être de là. Je n'ai pas encore eu le temps de tout
recompiler pour vérifier.

Je te tiens au courant de toute évolution.

aussi un probleme NFS (si la libbdd.a est sur une partition montee par NFS).

Pourquoi NFS ? Parce que la partition ne serait pas montée ? Un problème
possible avec l'automount ?

Merci encore du suivi,
Amicalement,
d.

David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/
Opinions expressed here are only mine.

@vicuna
Copy link
Author

vicuna commented Nov 4, 2000

Comment author: administrator

Je viens de me rendre compte que la bibliothèque libbdd.a était compilée
par le compilo de Sun, alors que le compilo ocaml utilise gcc 2.8.1. Le
problème vient peut-être de là. Je n'ai pas encore eu le temps de tout
recompiler pour vérifier.

C'est une possibilité, en effet.

aussi un probleme NFS (si la libbdd.a est sur une partition montee
par NFS).

Pourquoi NFS ? Parce que la partition ne serait pas montée ? Un problème
possible avec l'automount ?

On rencontre parfois des "glitches" de NFS, en particulier lorsque le
serveur et le client sont des Unix différents (p.ex. Linux et
Solaris).

  • Xavier Leroy

@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