[SRILM User List] Problem installing a software that depends on SRILM

Nickolay V. Shmyrev nshmyrev at yandex.ru
Fri Nov 4 10:02:12 PDT 2016


Hi Fernando

I'm sorry, order of the libraries is also important. It takes -lz from boost from system, not the one from srilm. I suggest you to try the following change in Makefile and it should work:


diff -upr t3/Makefile t3.new/Makefile
--- t3/Makefile	2008-08-26 18:07:52.000000000 +0200
+++ t3.new/Makefile	2016-11-04 17:14:05.000000000 +0100
@@ -19,7 +19,7 @@ LD = g++
 SRILM=$(HOME)/workspace/srilm
 SRILM_INC=$(SRILM)/include
 SRILM_LIB=$(SRILM)/lib/i686-m64
-SRILM_LIBS=-L$(SRILM_LIB) -loolm -lmisc -ldstruct
+SRILM_LIBS=-L$(SRILM_LIB) -loolm -lmisc -ldstruct -lz -fopenmp
 
 # location of boost
 BOOST_INC=/usr/include
@@ -33,7 +33,7 @@ LDFLAGS += -O3
 # and also in svm_light/Makefile and svm_struct/Makefile
 CXXFLAGS += -MD -Wall -I$(BOOST_INC) -I$(SRILM_INC) 
 CFLAGS += -MD -Wall -I$(BOOST_INC)
-LDFLAGS += $(BOOST_LIBS) -lm -lz $(SRILM_LIBS)
+LDFLAGS += $(SRILM_LIBS) $(BOOST_LIBS) -lm
 
 all: transducer_learn transducer_classify harvest2 harvest_ghkm
 




04.11.2016, 14:22, "Fernando E Alva Manchego" <fealvamanchego1 at sheffield.ac.uk>:
> Hello Nickolay,
>
> Thank you for your reply.
>
> 1) I was only able to download 1.7.0-Lite and, for some reason, I wasn't able to edit the Makefile as the INSTALL instructions suggested. I tried with 1.6.0 instead, but when I ran "make test" all results were DIFFERS.
>
> 2) I tried this as well with 1.7.1, but the output is:
>
> .../srilm-1.7.1//lib/i686-m64/liboolm.a(hmaxent.o): In function `_ZN7hmaxent5model10param_sumsEv.omp_fn.2':
> .../srilm-1.7.1/lm/src/hmaxent.cc:310: undefined reference to `omp_get_num_threads'
> .../srilm-1.7.1/lm/src/hmaxent.cc:310: undefined reference to `omp_get_thread_num'
> .../srilm-1.7.1//lib/i686-m64/liboolm.a(hmaxent.o): In function `_ZN7hmaxent5model17ensure_exp_paramsEv.omp_fn.0':
> .../srilm-1.7.1/lm/src/hmaxent.cc:708: undefined reference to `omp_get_num_threads'
> .../srilm-1.7.1/lm/src/hmaxent.cc:708: undefined reference to `omp_get_thread_num'
> ...
> ...
> .../srilm-1.7.1//lib/i686-m64/libmisc.a(File.o): In function `File::fprintf(char const*, ...)':
> .../srilm-1.7.1/misc/src/File.cc:602: undefined reference to `gzvprintf'
>
> Then, I changed in the t3/Makefile the line:
>
> SRILM_LIBS=-L$(SRILM_LIB) -loolm -lmisc -ldstruct -lz -fopenmp
>
> With -fopenmp added (as well as -lz) I only get:
>
> .../srilm-1.7.1//lib/i686-m64/libmisc.a(File.o): In function `File::fprintf(char const*, ...)':
> .../srilm-1.7.1/misc/src/File.cc:602: undefined reference to `gzvprintf'
>
> Which is what I sent in the first email. Any other suggestion? Thank you!
>
> Best,
> Fernando
>
> On 3 November 2016 at 23:43, Nickolay V. Shmyrev <nshmyrev at yandex.ru> wrote:
>> Hello Fernando
>>
>> This is a bug caused by updates in SRILM 1.7.1, it introduced zlib dependency. You have the following options:
>>
>> 1) Use SRILM 1.7.0 instead
>>
>> 2) In t3/Makefile change the following line
>>
>> SRILM_LIBS=-L$(SRILM_LIB) -loolm -lmisc -ldstruct
>>
>> to
>>
>> SRILM_LIBS=-L$(SRILM_LIB) -loolm -lmisc -ldstruct -lz
>>
>> 03.11.2016, 20:29, "Fernando E Alva Manchego" <fealvamanchego1 at sheffield.ac.uk>:
>>> Hello,
>>>
>>> I'm trying to install a software that requires SRILM. I followed the instructions in the INSTALL file and run the tests and everything was fine (with SRILM 1.7.1). However, when I tried to compile that software I got the following errors:
>>>
>>> ..../srilm-1.7.1//lib/i686-m64/libmisc.a(File.o): In function `File::fprintf(char const*, ...)':
>>> ..../srilm-1.7.1/misc/src/File.cc:602: undefined reference to `gzvprintf'
>>>
>>> I'm not sure if the problem is related to srilm or to the software I'm trying to install. Any help you could give me will be much appreciated.
>>>
>>> The software I'm trying to install is here.
>>>
>>> The machine I'm trying to install it is a Scientific Linux release 6.8 (Carbon).
>>>
>>> Best,
>>> Fernando Alva Manchego
>>> ,
>>>
>>> _______________________________________________
>>> SRILM-User site list
>>> SRILM-User at speech.sri.com
>>> http://mailman.speech.sri.com/cgi-bin/mailman/listinfo/srilm-user



More information about the SRILM-User mailing list