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

"ocamlopt.opt -cc 'g++'" calls gcc instead of g++ #4621

Closed
vicuna opened this issue Oct 14, 2008 · 1 comment
Closed

"ocamlopt.opt -cc 'g++'" calls gcc instead of g++ #4621

vicuna opened this issue Oct 14, 2008 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 14, 2008

Original bug ID: 4621
Reporter: spiralvoice
Status: closed (set by @xavierleroy on 2008-10-15T08:49:45Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.11+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

Here is the command line of ocamlopt.opt

ocamlopt.opt -inline 10 -verbose -linkall -o mlnet
bigarray.cmxa unix.cmxa str.cmxa -ccopt " " -cclib "-lz " -cclib -lbz2 -ccopt "-pthread"

-cclib "-lgd -ljpeg -lfreetype -lpng12 -lz -lm" -ccopt "-L/usr/lib"
-cc 'g++' -ccopt '-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'
-cclib -lmagic
-I build build/cdk.cmxa build/magic.cmxa build/common.cmxa build/client.cmxa build/core.cmxa build/driver.cmxa src/daemon/common/commonMain.cmx

which results into these calls:

  • as -o '/tmp/camlstartup71aed3.o' '/tmp/camlstartup2827b1.s'
  • gcc -o 'mlnet' -I'/usr/local/lib/ocaml' '-Lbuild' '-L/usr/local/lib/ocaml' '/tmp/camlstartup71aed3.o' '/usr/local/lib/ocaml/std_exit.o' 'src/daemon/common/commonMain.o' 'build/driver.a' 'build/core.a' 'build/client.a' 'build/common.a' 'build/magic.a' 'build/cdk.a' '/usr/local/lib/ocaml/str.a' '/usr/local/lib/ocaml/unix.a' '/usr/local/lib/ocaml/bigarray.a' '/usr/local/lib/ocaml/stdlib.a' 'src/utils/cdk/gdstubs.o' '-lz' '-lbz2' 'src/networks/direct_connect/che3_c.o' 'src/networks/fasttrack/enc_type_1.o' 'src/networks/fasttrack/enc_type_2.o' 'src/networks/fasttrack/enc_type_20.o' 'src/networks/fasttrack/enc_type_80.o' 'src/networks/fasttrack/fst_crypt.o' 'src/networks/fasttrack/fst_crypt_ml.o' 'src/utils/lib/CryptoPP.o' 'src/utils/lib/CryptoPP_stubs.o' '-lz' '-lbz2' '-lz' '-lbz2' 'src/daemon/common/commonHasher_c.o' '-lz' '-lbz2' 'src/utils/lib/magiclib_stub.o' '-lz' '-lbz2' 'src/utils/cdk/zlibstubs.o' 'src/utils/cdk/heap_c.o' 'src/config/unix/os_stubs_c.o' 'src/utils/lib/fst_hash.o' 'src/utils/lib/md4_comp.o' 'src/utils/lib/md4_c.o' 'src/utils/lib/charsetstubs.o' 'src/utils/lib/md5_c.o' 'src/utils/lib/sha1_c.o' 'src/utils/lib/tiger.o' 'src/utils/lib/stubs_c.o' '-lz' '-lbz2' '-lstr' '-lunix' '-lbigarray' '-lz' '-lbz2' '-lgd' '-ljpeg' '-lfreetype' '-lpng12' '-lz' '-lm' '-lmagic' '/usr/local/lib/ocaml/libasmrun.a' -lm -ldl -pthread -L/usr/lib -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -pthread -pthread -pthread -pthread -pthread -pthread

It leads to linking problems with C++ code.
Using the same command with Ocaml 3.10.2 works.

Additional information

ocamlopt.opt -v

The Objective Caml native-code compiler, version 3.11+dev20 Private_abbrevs+natdynlink+lazy_patterns+fscanf debug (2008-10-08)
Standard library directory: /usr/local/lib/ocaml

@vicuna
Copy link
Author

vicuna commented Oct 15, 2008

Comment author: @xavierleroy

Thanks for reporting this regression. It is fixed in the 3.11 release branch.

@vicuna vicuna closed this as completed Oct 15, 2008
@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