hi,
I gave up a bit too early, I indeed forgot to add the rpath in the
environment variables before calling configure. I feel a bit ashamed.
However the resulting Makefile does not always automatically add it when
calling ocamlopt.opt
Sorry for the tedious output below, look at the last few lines:
[enb11@cthugha ocaml-lame-0.3.1]# gmake
gmake -C src all
gmake[1]: Entering directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
gmake[2]: Entering directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
making ._bcdi/lame.di from lame.mli
making ._d/lame.d from lame.ml
gmake[2]: Leaving directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
gmake[2]: Entering directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
ocamlc.opt -c -cc "gcc" -ccopt "-fPIC -I/usr/include -I/usr/pkg/include
-I/usr/pkg/lib/ocaml -Wall -DCAML_NAME_SPACE \
-DPIC -I/usr/include -I/usr/pkg/include
-I/usr/pkg/lib/ocaml -fPIC \
-o lame_stubs.o " lame_stubs.c
ar rcs liblame_stubs.a lame_stubs.o
ocamlc.opt -c lame.mli
ocamlc.opt -c lame.ml
ocamlmklib -L-R/usr/lib -L/usr/lib -L-R/usr/pkg/lib -L/usr/pkg/lib
-L-R/usr/pkg/lib/ocaml -L/usr/pkg/lib/ocaml \
-o lame_stubs lame_stubs.o -lmp3lame -lm \
-R/usr/pkg/lib/ocaml
-L/usr/pkg/lib/ocaml -R/usr/lib -L/usr/lib -R/usr/pkg/lib -L/usr/pkg/lib
ocamlc.opt -a -dllib dlllame_stubs.so -ccopt -R/usr/lib -ccopt
-L/usr/lib -ccopt -R/usr/pkg/lib -ccopt -L/usr/pkg/lib -ccopt
-R/usr/pkg/lib/ocaml -ccopt -L/usr/pkg/lib/ocaml -ccopt -L-R/usr/lib
-ccopt -L/usr/lib -ccopt -L-R/usr/pkg/lib -ccopt -L/usr/pkg/lib -ccopt
-L-R/usr/pkg/lib/ocaml -ccopt -L/usr/pkg/lib/ocaml \
-cclib -llame_stubs -cclib -lmp3lame
-cclib -lm -o lame.cma lame.cmo
gmake[2]: Leaving directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
gmake[2]: Entering directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
making ._ncdi/lame.di from lame.mli
gmake[2]: Leaving directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
gmake[2]: Entering directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
gmake[2]: `liblame_stubs.a' is up to date.
ocamlopt.opt -c lame.ml
ocamlopt.opt -a -ccopt -R/usr/lib -ccopt -L/usr/lib -ccopt
-R/usr/pkg/lib -ccopt -L/usr/pkg/lib -ccopt -R/usr/pkg/lib/ocaml -ccopt
-L/usr/pkg/lib/ocaml -ccopt -L-R/usr/lib -ccopt -L/usr/lib -ccopt
-L-R/usr/pkg/lib -ccopt -L/usr/pkg/lib -ccopt -L-R/usr/pkg/lib/ocaml
-ccopt -L/usr/pkg/lib/ocaml -cclib -llame_stubs -cclib -lmp3lame
-cclib -lm \
-o lame.cmxa lame.cmx
gmake[2]: Leaving directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
ocamlc.opt -i -intf lame_dynlink.mli.in > lame_dynlink.mli 2>/dev/null
ocamlc.opt -a lame_dynlink.mli lame_loader.ml -o lame_loader.cma
[ ! -f lame.cmx ] || mv lame.cmx lame.cmx.old
ocamlopt.opt -cclib -lmp3lame -cclib -lm -shared lame.ml lame_stubs.o
-o lame.cmxs
ld: cannot find -lmp3lame
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
gmake[1]: *** [lame.cmxs] Error 2
gmake[1]: Leaving directory
`/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
gmake: *** [all] Error 2
See the last call to ocamlopt.opt, the -ccopt switches are not
automatically added, manually including them on the command line fixes
it though:
[enb11@cthugha ocaml-lame-0.3.1]# cd src/
[enb11@cthugha src]# ocamlopt.opt -cclib -lmp3lame -cclib -lm -shared
lame.ml lame_stubs.o -o lame.cmxs -ccopt -R/usr/pkg/lib -ccopt
-L/usr/pkg/lib
No error, no warning
Is this something I had overlooked? or does it need to be directly fixed
in the configure?
Maybe there's a magic OCaml environment variable for setting it once and
for all.
I'm now a few steps closer to getting a test build of 1.0.1 :)
--
best regards,
okay_awright
<okay_awright AT ddcr DOT biz>
[PGP key on request]
On 21/07/2012 19:29, okay_awright wrote:
> Hello,
> I usually have hard times tweaking the configuration files etc for
> compiling a new release but this time I just give up
>
> [root@nyarlathotep ocaml-lame-0.3.1]# ./configure
> configuring ocaml-lame 0.3.1
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking build system type... x86_64-unknown-netbsd5.1
> checking host system type... x86_64-unknown-netbsd5.1
> checking for a BSD-compatible install... /usr/bin/install -c
> checking that calling user is not root... ok
> checking for gcc... (cached) gcc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for gcc option to accept ISO C89... (cached) none needed
> checking for ar... ar
> checking for ocamlc... ocamlc
> OCaml version is 3.12.0
> checking if ocaml compiler supports first-class modules... yes
> OCaml library path is /usr/pkg/lib/ocaml
> checking for ocamlopt... ocamlopt
> checking for ocamlc.opt... ocamlc.opt
> checking for ocamlopt.opt... ocamlopt.opt
> checking for ocaml... ocaml
> checking for ocamldep... ocamldep
> checking for ocamlmktop... ocamlmktop
> checking for ocamlmklib... ocamlmklib
> checking for ocamldoc... ocamldoc
> checking for ocamlbuild... ocamlbuild
> checking for camlidl... no
> checking for ocamllex... ocamllex
> checking for ocamllex.opt... ocamllex.opt
> checking for ocamlyacc... ocamlyacc
> checking for camlp4... camlp4
> checking for camlp4boot... camlp4boot
> checking for camlp4o... camlp4o
> checking for camlp4of... camlp4of
> checking for camlp4oof... camlp4oof
> checking for camlp4orf... camlp4orf
> checking for camlp4prof... camlp4prof
> checking for camlp4r... camlp4r
> checking for camlp4rf... camlp4rf
> checking for ocamlfind... ocamlfind
> checking for caml/threads.h... no
> checking for gcc option to produce PIC... -fPIC
> checking whether to build shared modules... yes
> checking how to run the C preprocessor... gcc -E
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for ANSI C header files... no
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking lame/lame.h usability... yes
> checking lame/lame.h presence... yes
> checking for lame/lame.h... yes
> checking for lame_init... yes
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating src/Makefile
> config.status: creating src/META
>
> [root@nyarlathotep ocaml-lame-0.3.1]# gmake
> gmake -C src all
> gmake[1]: Entering directory
> `/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
> gmake[2]: Entering directory
> `/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
> gmake[2]: `liblame_stubs.a' is up to date.
> gmake[2]: `lame.cma' is up to date.
> gmake[2]: Leaving directory
> `/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
> gmake[2]: Entering directory
> `/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
> gmake[2]: `liblame_stubs.a' is up to date.
> ocamlopt.opt -a -ccopt -L/usr/lib -ccopt -L/usr/pkg/lib -ccopt
> -L/usr/lib -ccopt -L/usr/pkg/lib -cclib -llame_stubs -cclib -lmp3lame
> -cclib -lm \
> -o lame.cmxa lame.cmx
> gmake[2]: Leaving directory
> `/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
> [ ! -f lame.cmx ] || mv lame.cmx lame.cmx.old
> ocamlopt.opt -cclib -lmp3lame -cclib -lm -shared lame.ml lame_stubs.o
> -o lame.cmxs
> ld: cannot find -lmp3lame
> File "caml_startup", line 1, characters 0-1:
> Error: Error during linking
> gmake[1]: *** [lame.cmxs] Error 2
> gmake[1]: Leaving directory
> `/home/dummy/liquidsoap-1.0.1-full/ocaml-lame-0.3.1/src'
> gmake: *** [all] Error 2
>
> [root@nyarlathotep ocaml-lame-0.3.1]# echo CPPFLAGS="$CPPFLAGS"
> CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" OCAMLMKLIB_FLAGS="$OCAMLMKLIB_FLAGS"
> CPPFLAGS=-I/usr/include -I/usr/pkg/include CFLAGS=-I/usr/include
> -I/usr/pkg/include LDFLAGS=-L/usr/lib -L/usr/pkg/lib
> OCAMLMKLIB_FLAGS=-L/usr/lib -L/usr/pkg/lib -L/usr/pkg/lib/ocaml
>
> [root@nyarlathotep ocaml-lame-0.3.1]# ls -al /usr/pkg/lib/*lame*
> -rwxr-xr-x 1 root wheel 420114 Jul 21 16:22 /usr/pkg/lib/libmp3lame.a
> -rwxr-xr-x 1 root wheel 1003 Jul 21 16:22 /usr/pkg/lib/libmp3lame.la
> lrwx------ 1 root wheel 19 Jul 21 16:22
> /usr/pkg/lib/libmp3lame.so -> libmp3lame.so.0.0.0
> lrwx------ 1 root wheel 19 Jul 21 16:22
> /usr/pkg/lib/libmp3lame.so.0 -> libmp3lame.so.0.0.0
> -rwxr-xr-x 1 root wheel 312821 Jul 21 16:22
> /usr/pkg/lib/libmp3lame.so.0.0.0
>
>
> I found this in the config.log:
>
> configure:5853: gcc -c -I/usr/include -I/usr/pkg/include
> -I/usr/pkg/lib/ocaml -I/usr/include -I/usr/pkg/include
> -I/usr/pkg/lib/ocaml -fPIC conftest.c >&5
> configure:5853: $? = 0
> configure:5926: gcc -o conftest -I/usr/include -I/usr/pkg/include
> -I/usr/pkg/lib/ocaml -I/usr/include -I/usr/pkg/include
> -I/usr/pkg/lib/ocaml -fPIC -L/usr/lib -L/usr/pkg/lib -
> L/usr/pkg/lib/ocaml conftest.c -lmp3lame -lm >&5
> configure:5926: $? = 0
> configure:5926: ./conftest
> Shared object "libmp3lame.so.0" not found
> configure:5926: $? = 1
> configure: program exited with status 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "ocaml-lame"
> | #define PACKAGE_TARNAME "ocaml-lame"
> | #define PACKAGE_VERSION "0.3.1"
> | #define PACKAGE_STRING "ocaml-lame 0.3.1"
> | #define PACKAGE_BUGREPORT "[email protected]"
> | #define PACKAGE_URL ""
> | /* end confdefs.h. */
> | #include <ctype.h>
> | #include <stdlib.h>
> | #if ((' ' & 0x0FF) == 0x020)
> | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
> | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
> | #else
> | # define ISLOWER(c) (('a' <= (c) && (c) <= 'i')
> || ('j' <= (c) && (c) <= 'r') || ('s' <= (c) &&
> (c) <= 'z'))
> | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
> | #endif
> |
> | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
> | int
> | main ()
> | {
> | int i;
> | for (i = 0; i < 256; i++)
> | if (XOR (islower (i), ISLOWER (i))
> | || toupper (i) != TOUPPER (i))
> ...
>
>
> Any help or hint? please
>
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users