savonet / ocaml-taglib

OCaml bindings to taglib.
http://liquidsoap.info/
Other
10 stars 1 forks source link

Can not compile taglib under FreeBSD #5

Closed dkossako closed 7 years ago

dkossako commented 7 years ago

Hello,

I'm trying to compile TagLib from liquidsoap-1.2.1 package, with such result. How can I resolve that?

OCAMLOPT -c main.ml OCAMLOPT -c runner.ml CC -c tools/locale_c.c CC -c io/oss_io_c.c OCAMLOPT -o liquidsoap findlib: [WARNING] Package camlp4 has multiple definitions in /usr/local/lib/ocaml/site-lib/camlp4/META, /usr/local/lib/ocaml/camlp4/META /home/stream/ls/liquidsoap-1.2.1-full/liquidsoap-1.2.1/../ocaml-taglib-0.3.2/src /libtaglib_stubs.a(taglib_stubs.o): In function __static_initialization_and_destruction_0(int, int)': taglib_stubs.cc:(.text+0x1ebf): undefined reference tostd::ios_base::Init::Init()' taglib_stubs.cc:(.text+0x1ed4): undefined reference to `std::ios_base::Init::~Init()' cc: error: linker command failed with exit code 1 (use -v to see invocation) File "caml_startup", line 1: Error: Error during linking gmake[3]: [../Makefile.rules:110: liquidsoap] Error 2 gmake[3]: Leaving directory '/usr/home/stream/ls/liquidsoap-1.2.1-full/liquidsoap-1.2.1/src' gmake[2]: [../Makefile.rules:67: all-auto-ocaml-prog] Error 2 gmake[2]: Leaving directory '/usr/home/stream/ls/liquidsoap-1.2.1-full/liquidsoap-1.2.1/src' gmake[1]: [Makefile.rules:27: all-subdirs] Error 2 gmake[1]: Leaving directory '/usr/home/stream/ls/liquidsoap-1.2.1-full/liquidsoap-1.2.1' gmake: [Makefile:11: all] Error 1

mikhailter commented 7 years ago

The same thing over a few years. Is there any solution how to link ocaml-taglib on FreeBSD?

OCAMLOPT -c main.ml OCAMLOPT -c runner.ml CC -c tools/locale_c.c CC -c tools/timezone_c.c CC -c io/oss_io_c.c OCAMLOPT -o liquidsoap /usr/local/lib/ocaml/site-lib/taglib/libtaglib_stubs.a(taglib_stubs.o): In function std::__verify_grouping(char const*, unsigned long, std::string const&)': taglib_stubs.cc:(.text+0x11a): undefined reference tostd::string::size() const' taglib_stubs.cc:(.text+0x165): undefined reference to std::string::operator[](unsigned long) const' taglib_stubs.cc:(.text+0x1a4): undefined reference tostd::string::operator[](unsigned long) const' taglib_stubs.cc:(.text+0x1ed): undefined reference to std::string::operator[](unsigned long) const' /usr/local/lib/ocaml/site-lib/taglib/libtaglib_stubs.a(taglib_stubs.o): In functionstatic_initialization_and_destruction_0(int, int)': taglib_stubs.cc:(.text+0x245): undefined reference to std::ios_base::Init::Init()' /usr/local/lib/ocaml/site-lib/taglib/libtaglib_stubs.a(taglib_stubs.o): In functiontcf_0': taglib_stubs.cc:(.text+0x2a4): undefined reference to `std::ios_base::Init::~Init()' cc: error: linker command failed with exit code 1 (use -v to see invocation) File "caml_startup", line 1: Error: Error during linking gmake[3]: [../Makefile.rules:110: liquidsoap] Error 2 gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src' gmake[2]: [../Makefile.rules:67: all-auto-ocaml-prog] Error 2 gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src' gmake[1]: [Makefile.rules:27: all-subdirs] Error 2 gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1' gmake: [Makefile:11: all] Error 1

toots commented 7 years ago

Hey!

Could you post the output of the ocaml-taglib build and also the output of the liquidsoap build when doing: make V="" ? Thanks!

mikhailter commented 7 years ago

Taglib is building fine:

{ventoso}/usr/local/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3> gmake all
gmake -C src all
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
making ._bcdi/taglib.di from taglib.mli
making ._d/taglib.d from taglib.ml
g++ -c     -DPIC -I/usr/local/include -fPIC -I .. -I/usr/local/include/taglib  \
                        -I'/usr/local/lib/ocaml' \
                        taglib_stubs.cc -o taglib_stubs.o
ar rcs libtaglib_stubs.a  taglib_stubs.o
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8@11@12@20-35-44-45-50 taglib.mli
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8@11@12@20-35-44-45-50 taglib.ml
ocamlmklib      -L/usr/local/lib -L/usr/local/lib    \
                        -o taglib_stubs  taglib_stubs.o -ltag -lstdc++ \

ocamlc.opt -a -dllib dlltaglib_stubs.so       -ccopt -L/usr/local/lib -ccopt -L/usr/local/lib  -ccopt -L/usr/local/lib -ccopt -L/usr/local/lib     \
                        -cclib -ltaglib_stubs -cclib -ltag -cclib -lstdc++  -o taglib.cma  taglib.cmo
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
making ._ncdi/taglib.di from taglib.mli
gmake[2]: 'libtaglib_stubs.a' is up to date.
ocamlopt.opt -c -dtypes -g -w +A-4@5-7@8@11@12@20-35-44-45-50 taglib.ml
ocamlopt.opt -a        -ccopt -L/usr/local/lib -ccopt -L/usr/local/lib  -ccopt -L/usr/local/lib -ccopt -L/usr/local/lib    -cclib -ltaglib_stubs -cclib -ltag -cclib -lstdc++  \
                         -o taglib.cmxa taglib.cmx
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'

But, on stage of linking while building liquidsoap-full:

{ventoso}/usr/local/leech/liquidsoap-1.3.1-full> gmake all V=""
for i in ocaml-cry-0.5.0 ocaml-mad-0.4.5 ocaml-taglib-0.3.3 ocaml-lame-0.3.3 ocaml-dtools-0.3.3 ocaml-duppy-0.6.0 ocaml-mm-0.3.0 liquidsoap-1.3.1; do gmake -C $i || exit 1; done
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0'
gmake -C src all
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0/src'
gmake[3]: 'cry.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0/src'
gmake[3]: 'cry.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0/src'
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-cry-0.5.0'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5'
gmake -C src
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5/src'
gmake[3]: 'libmad_stubs.a' is up to date.
gmake[3]: 'mad.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5/src'
gmake[3]: 'libmad_stubs.a' is up to date.
gmake[3]: 'mad.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5/src'
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mad-0.4.5'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3'
gmake -C src all
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[3]: 'libtaglib_stubs.a' is up to date.
gmake[3]: 'taglib.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[3]: 'libtaglib_stubs.a' is up to date.
gmake[3]: 'taglib.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-taglib-0.3.3'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3'
gmake -C src all
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3/src'
gmake[3]: 'liblame_stubs.a' is up to date.
gmake[3]: 'lame.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3/src'
gmake[3]: 'liblame_stubs.a' is up to date.
gmake[3]: 'lame.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3/src'
rm -f lame_dynlink.cmi
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-lame-0.3.3'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3'
gmake -C src
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3/src'
gmake[3]: 'dtools.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3/src'
gmake[3]: 'dtools.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3/src'
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-dtools-0.3.3'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0'
gmake -C src all
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0/src'
gmake[3]: 'libduppy_stubs.a' is up to date.
gmake[3]: 'duppy.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0/src'
gmake[3]: 'libduppy_stubs.a' is up to date.
gmake[3]: 'duppy.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0/src'
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-duppy-0.6.0'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0'
gmake -C src all
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0/src'
gmake[3]: 'libmm_stubs.a' is up to date.
gmake[3]: 'mm.cma' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0/src'
gmake[3]: 'libmm_stubs.a' is up to date.
gmake[3]: 'mm.cmxa' is up to date.
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0/src'
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0/src'
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/ocaml-mm-0.3.0'
gmake[1]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1'
gmake[2]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/tools'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/tools'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/decoder'
gmake[4]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/decoder/image'
gmake[4]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/decoder/image'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/decoder'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/playlists'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/playlists'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/encoder'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/encoder'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/protocols'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/protocols'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/plugins'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/plugins'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/stream'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/stream'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/lang'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/lang'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/ogg_formats'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/ogg_formats'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/converters'
gmake[4]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/converters/audio'
gmake[4]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/converters/audio'
gmake[4]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/converters/video'
gmake[4]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/converters/video'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/converters'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/operators'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/operators'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/sources'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/sources'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/conversions'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/conversions'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/outputs'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/outputs'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/io'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/io'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/visualization'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/visualization'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/analyze'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/analyze'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/synth'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/synth'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/harbor'
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src/harbor'
gmake[3]: Entering directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src'
echo OCAMLOPT -o liquidsoap
OCAMLOPT -o liquidsoap
ocamlfind ocamlopt -o liquidsoap \
        -g -annot  -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -ccopt "-fPIC -I/usr/local/lib/ocaml -g" -package bytes -package pcre -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-dtools-0.3.3/src  -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-duppy-0.6.0/src  -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-duppy-0.6.0/src  -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-cry-0.5.0/src  -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-mm-0.3.0/src  -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-mad-0.4.5/src  -package dynlink -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-lame-0.3.3/src  -I /var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src  -package camomile -thread -I tools -I decoder -I playlists -I encoder -I protocols -I plugins -I stream -I lang -I ogg_formats -I converters -I operators -I sources -I conversions -I outputs -I io -I visualization -I analyze -I synth -I harbor \
        -g -linkpkg -package unix -package threads -package str -package bigarray  -package str -package unix -package threads dtools.cmxa  -package unix -package threads -package pcre -package bigarray -package camlp4 duppy.cmxa  -package unix -package threads -package pcre -package bigarray -package camlp4 duppy.cmxa  -package unix -package bytes cry.cmxa  -package unix -package bigarray mm.cmxa  -package unix mad.cmxa  lame.cmxa  -package unix taglib.cmxa  -cclib "-L/usr/local/lib"  \
        shutdown.cmx tools/stdlib.cmx tools/doc.cmx tools/utils.cmx tools/plug.cmx tools/rqueue.cmx tools/fdkaac_dynlink.cmx tools/wav_aiff.cmx tools/tutils.cmx tools/JSON.cmx tools/file_watcher.cmx tools/file_watcher_mtime.cmx configure.cmx tools/process_handler.cmx tools/dyntools.cmx tools/http.cmx tools/pool.cmx tools/sha1.cmx tools/websocket.cmx SVN.cmx converters/audio_converter.cmx stream/frame.cmx stream/generator.cmx stream/aFrame.cmx stream/vFrame.cmx stream/mFrame.cmx decoder/decoder.cmx request.cmx tools/server.cmx source.cmx clock.cmx tools/rutils.cmx playlist_parser.cmx encoder/encoder.cmx tools/server_builtins.cmx lang/lang_types.cmx lang/lang_values.cmx lang/lang_encoders.cmx lang/lang_parser.cmx lang/lang_lexer.cmx lang/lang_pp.cmx lang/lang.cmx tools/start_stop.cmx tools/ioRing.cmx tools/icecast_utils.cmx tools/avi.cmx converters/video_converter.cmx converters/video/native_video_converter.cmx converters/audio/native_audio_converter.cmx protocols/annotate.cmx protocols/mpd.cmx sources/synthesized.cmx sources/noise.cmx sources/blank.cmx sources/audio_gen.cmx sources/request_source.cmx sources/latest_metadata.cmx sources/req_simple.cmx sources/playlist.cmx sources/req_queue.cmx sources/req_equeue.cmx sources/generated.cmx sources/http_source.cmx harbor/harbor_base.cmx harbor/harbor.cmx sources/harbor_input.cmx sources/external_input.cmx tools/liqMM.cmx conversions/audio_to_stereo.cmx conversions/drop.cmx conversions/id.cmx conversions/swap.cmx conversions/mean.cmx conversions/mux.cmx outputs/output.cmx outputs/pipe_output.cmx outputs/harbor_output.cmx outputs/icecast2.cmx operators/insert_metadata.cmx operators/map_metadata.cmx operators/on_metadata.cmx operators/store_metadata.cmx operators/on_track.cmx operators/on_end.cmx operators/delay.cmx operators/switch.cmx operators/fade.cmx operators/add.cmx operators/sequence.cmx operators/cross.cmx operators/smartcross.cmx operators/compress_exp.cmx operators/pitch.cmx operators/pipe.cmx operators/fir_filter.cmx operators/iir_filter.cmx operators/filter_rc.cmx operators/biquad_filter.cmx operators/cuepoint.cmx operators/map_op.cmx operators/flanger.cmx operators/comb.cmx operators/compress.cmx operators/clip.cmx operators/filter.cmx operators/setvol.cmx operators/normalize.cmx operators/echo.cmx operators/append.cmx operators/pan.cmx operators/ms_stereo.cmx operators/dyn_op.cmx operators/video_effects.cmx operators/video_fade.cmx operators/noblank.cmx operators/compand.cmx operators/on_offset.cmx operators/mixing_table.cmx operators/prepend.cmx operators/midi_routing.cmx operators/sleeper.cmx operators/time_warp.cmx operators/resample.cmx operators/chord.cmx operators/video_text.cmx operators/window_op.cmx encoder/wav_encoder.cmx encoder/avi_encoder.cmx encoder/lame_encoder.cmx encoder/fdkaac_encoder.cmx encoder/external_encoder.cmx encoder/fdkaac_encoder_dynlink.cmx encoder/lame_encoder_builtin.cmx encoder/taglib_id3v2.cmx io/udp_io.cmx io/oss_io.cmx analyze/analyze_rms.cmx playlists/playlist_basic.cmx visualization/vumeter.cmx visualization/midimeter.cmx visualization/video_volume.cmx synth/keyboard.cmx synth/synth_op.cmx decoder/metadata_decoder.cmx decoder/wav_aiff_decoder.cmx decoder/midi_decoder.cmx decoder/image_decoder.cmx decoder/image/ppm_decoder.cmx decoder/external_decoder.cmx decoder/raw_audio_decoder.cmx decoder/mad_decoder.cmx decoder/taglib_plug.cmx shebang.cmx lang/lang_builtins.cmx lang/builtins_json.cmx lang/builtins_harbor.cmx lang/builtins_cry.cmx main.cmx runner.cmx \
        tools/locale_c.o tools/timezone_c.o io/oss_io_c.o
/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `std::__verify_grouping(char const*, unsigned long, std::string const&)':
taglib_stubs.cc:(.text+0x11a): undefined reference to `std::string::size() const'
taglib_stubs.cc:(.text+0x165): undefined reference to `std::string::operator[](unsigned long) const'
taglib_stubs.cc:(.text+0x1a4): undefined reference to `std::string::operator[](unsigned long) const'
taglib_stubs.cc:(.text+0x1ed): undefined reference to `std::string::operator[](unsigned long) const'
/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `__static_initialization_and_destruction_0(int, int)':
taglib_stubs.cc:(.text+0x245): undefined reference to `std::ios_base::Init::Init()'
/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `__tcf_0':
taglib_stubs.cc:(.text+0x2a4): undefined reference to `std::ios_base::Init::~Init()'
/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `std::list<TagLib::String, std::allocator<TagLib::String> >::_M_insert(std::_List_iterator<TagLib::String>, TagLib::String const&)':
taglib_stubs.cc:(.text._ZNSt4listIN6TagLib6StringESaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_[_ZNSt4listIN6TagLib6StringESaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_]+0x2e): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `std::_Rb_tree_iterator<std::pair<TagLib::String const, TagLib::StringList> >::operator++(int)':
taglib_stubs.cc:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKN6TagLib6StringENS1_10StringListEEEppEi[_ZNSt17_Rb_tree_iteratorISt4pairIKN6TagLib6StringENS1_10StringListEEEppEi]+0x22): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
gmake[3]: *** [../Makefile.rules:110: liquidsoap] Error 2
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src'
gmake[2]: *** [../Makefile.rules:67: all-auto-ocaml-prog] Error 2
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src'
gmake[1]: *** [Makefile.rules:27: all-subdirs] Error 2
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1'
gmake: *** [Makefile:11: all] Error 1
toots commented 7 years ago

Thank you. Can you try compiling ocaml-taglib starting with this command:

./configure CPPFLAGS="-static-libstdc++"
mikhailter commented 7 years ago

The same - taglib compiling without any issues, building liquidsoap-full breaks with the same error (on linking?).

...
OCAMLOPT -o liquidsoap
/usr/local/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `std::__verify_grouping(char const*, unsigned long, std::string const&)':
taglib_stubs.cc:(.text+0x11a): undefined reference to `std::string::size() const'
taglib_stubs.cc:(.text+0x165): undefined reference to `std::string::operator[](unsigned long) const'
taglib_stubs.cc:(.text+0x1a4): undefined reference to `std::string::operator[](unsigned long) const'
taglib_stubs.cc:(.text+0x1ed): undefined reference to `std::string::operator[](unsigned long) const'
/usr/local/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `__static_initialization_and_destruction_0(int, int)':
taglib_stubs.cc:(.text+0x245): undefined reference to `std::ios_base::Init::Init()'
/usr/local/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `__tcf_0':
taglib_stubs.cc:(.text+0x2a4): undefined reference to `std::ios_base::Init::~Init()'
/usr/local/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `std::list<TagLib::String, std::allocator<TagLib::String> >::_M_insert(std::_List_iterator<TagLib::String>, TagLib::String const&)':
taglib_stubs.cc:(.text._ZNSt4listIN6TagLib6StringESaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_[_ZNSt4listIN6TagLib6StringESaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_]+0x2e): undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
/usr/local/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/../ocaml-taglib-0.3.3/src/libtaglib_stubs.a(taglib_stubs.o): In function `std::_Rb_tree_iterator<std::pair<TagLib::String const, TagLib::StringList> >::operator++(int)':
taglib_stubs.cc:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKN6TagLib6StringENS1_10StringListEEEppEi[_ZNSt17_Rb_tree_iteratorISt4pairIKN6TagLib6StringENS1_10StringListEEEppEi]+0x22): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
gmake[3]: *** [../Makefile.rules:110: liquidsoap] Error 2
gmake[3]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src'
gmake[2]: *** [../Makefile.rules:67: all-auto-ocaml-prog] Error 2
gmake[2]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1/src'
gmake[1]: *** [Makefile.rules:27: all-subdirs] Error 2
gmake[1]: Leaving directory '/var/leech/liquidsoap-1.3.1-full/liquidsoap-1.3.1'
gmake: *** [Makefile:11: all] Error 1
toots commented 7 years ago

Ok. Thanks for trying. Yes, it's an issue when linking the C++ code. Compiled C++ code needs to link with the stdc++ library. Usually this is taken care by using g++ as the linker but since OCaml interfaces at the C level, gcc is used instead. We pass -lstdc++ to tell it to link with the standard C++ library but that does not always work.

I'm gonna see if I can setup a FreeBSD virtual machine to test it myself. Meanwhile, you can try to have liquidsoap link with g++. Also, you can try to compile the examples in the ocaml-taglib source tree, that might help getting more information on the issue.

mikhailter commented 7 years ago

Ok, i see. Thank you for your attention to this bug. Tell me if you need shell on one of my FreeBSD servers for tests. It would be great for all FreeBSD geeks to have ability to build liquidsoap on their boxes :)

toots commented 7 years ago

Ok, it seems that this is caused by an inconsistency in C compilers. If you make sure to use gcc in both ocaml-taglib and liquidsoap then it should compile fine. How do you configure ocaml-taglib and liquidsoap?

mikhailter commented 7 years ago

Hi, ocaml-taglib as well as liquidsoal-full building with gmake using gcc/g++.

Here the configuration string:

./configure --disable-graphics LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include

compiler entries from config.status:

S["CPP"]="gcc -E" S["ac_ct_CC"]="gcc" S["CC"]="gcc"

gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
gmake -v
GNU Make 4.2.1
Built for amd64-portbld-freebsd10.3
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
toots commented 7 years ago

Ok, so it was indeed a problem of using the gcc compiler when building liquidsoap. Just fixed it in the liquidsoap source code. Should work fine now!