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

missing caml_curry8 during linking while using -pack && .cmxa #7956

Closed
vicuna opened this issue Nov 23, 2002 · 5 comments
Closed

missing caml_curry8 during linking while using -pack && .cmxa #7956

vicuna opened this issue Nov 23, 2002 · 5 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 23, 2002

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

Bug description

To produce the bug I've used Gerd Stoplmann's Shell module, but I'm able
to reproduce the bug also with other packages which are not part of the
ocaml distribution, actually all other external modules I've tried
manifest this behaviour.

Shell module is available at http://www.ocaml-programming.de/

(*** File: a.ml )
ignore (Shell.command);; (
just to use an external findlib module )
let foo () = prerr_endline "Hello, world!";;
(
END ***)

(*** File: test.ml )
B.A.foo ();;
(
END ***)

$ ocamlopt -I +shell -c a.ml
File "a.ml", line 1, characters 8-21:
Warning: this function application is partial,
maybe some arguments are missing.

$ ocamlopt -pack -o b.cmx a.cmx

$ ocamlopt -o b.cmxa -a b.cmx

$ ocamlopt -I +shell str.cmxa unix.cmxa shell.cmxa b.cmxa test.ml
/usr/lib/ocaml/shell/shell.a(shell_sys.o)(.data+0x144): In function Shell_sys__2': : undefined reference to caml_curry8'
collect2: ld returned 1 exit status
Error during linking

Cheers.

--
Stefano Zacchiroli - undergraduate student of CS @ Uni. Bologna, Italy
zack@cs.unibo.it | ICQ 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney

@vicuna
Copy link
Author

vicuna commented Nov 25, 2002

Comment author: administrator

To produce the bug I've used Gerd Stoplmann's Shell module, but I'm able
to reproduce the bug also with other packages which are not part of the
ocaml distribution, actually all other external modules I've tried
manifest this behaviour.

I ran your test case exactly as provided, but the error you mention
did not appear, with OCaml 3.06 nor with the development version.

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Nov 26, 2002

Comment author: administrator

On Mon, Nov 25, 2002 at 11:48:10AM +0100, Xavier Leroy wrote:

I ran your test case exactly as provided, but the error you mention
did not appear, with OCaml 3.06 nor with the development version.

Well, I've initially thought that the problem was related to the debian
package (I'm working on a Debian box) so I asked the debian ocaml
maintainer (Sven Luther), but I was able to reproduce the bug also
rebuilding an ocaml 3.06 suite from scratch without applying any
additional patch.

So currently the bug manifests itself on debian boxes, no matter of
which kind (debian package or home-build) of ocaml compiler you are
using.

Frankly I don't know where to look to better identify the bug, any
hints?
Do you have a debian box on which debug the problem?

TIA,
Cheers.

--
Stefano Zacchiroli - undergraduate student of CS @ Uni. Bologna, Italy
zack@cs.unibo.it | ICQ 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney

@vicuna
Copy link
Author

vicuna commented Nov 27, 2002

Comment author: administrator

On Tue, Nov 26, 2002 at 05:05:15PM +0100, Stefano Zacchiroli wrote:

I ran your test case exactly as provided, but the error you mention
did not appear, with OCaml 3.06 nor with the development version.
Well, I've initially thought that the problem was related to the debian
package (I'm working on a Debian box) so I asked the debian ocaml

Remi Vanicat was able to reproduce the bug also on a RedHat 7.2 building
the ocaml compiler from scratch using gcc 2.96 and glibc 2.2.4.

So the question moves forward: which machine are you using Xavier? You
seems the only one which is not affected by the bug ... :-D

Thanks for your work,
Cheers.

--
Stefano Zacchiroli - undergraduate student of CS @ Uni. Bologna, Italy
zack@cs.unibo.it | ICQ 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney

@vicuna
Copy link
Author

vicuna commented Dec 2, 2002

Comment author: administrator

Remi Vanicat was able to reproduce the bug also on a RedHat 7.2 building
the ocaml compiler from scratch using gcc 2.96 and glibc 2.2.4.
So the question moves forward: which machine are you using Xavier? You
seems the only one which is not affected by the bug ... :-D

I was eventually able to reproduce the bug. It's not a question of
machine, but of .cmx availability. In my initial experiment, I didn't
install the Shell library, just used -I /path/to/source/dir/shell,
and this way all .cmx files for Shell modules were available. Gerd's
install for the Shell library doesn't copy all .cmx files in +shell.
Normally, this causes no problems with ocamlopt: some opportunities
for optimization are lost, but correct code is generated. This isn't
so with ocamlopt -pack, and this is where the bug really lies. I'll
fix that shortly.

Best wishes,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Dec 2, 2002

Comment author: administrator

Fixed 2002-12-02 by XL.

@vicuna vicuna closed this as completed Dec 2, 2002
@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