-1

I am trying to implement text generator of JAMR. It redirects me to install cdec. I followed this tutorial to install cdec. BUT

I installed gcc-4.8 (I had a better version 5.x but I thought 4.8 is neccessary). So I installed gcc-4.8 using this. And I build Boost using this (in ~/prefix/sw), I used boost_1_58 because it was latest. Everything worked fine.

Coming back to the tutorial, instead of cd ~/prefix/sw I went to cd jamr/tools/cdec where my cdec is present. Did autoreconf -ifv and ./configure --prefix=/home/student/prefix, fine till now (I just had to comment line 216 of containing boost_major_version and wrote boost_major_version="158"). But when I do make after a while I get

libtool: link: g++ -std=gnu++11 -fPIC -g -O3 /usr/lib /usr/lib -o reconstruct_weights reconstruct_weights.o  -L/usr/lib libutils.a -ldl -lrt -lboost_program_options -lboost_regex -lboost_serialization -lboost_system -lboost_filesystem -lz -lbz2
/usr/bin/ld: cannot find /usr/lib: File format not recognized
/usr/bin/ld: cannot find /usr/lib: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:836: recipe for target 'reconstruct_weights' failed
make[2]: *** [reconstruct_weights] Error 1
make[2]: Leaving directory '/home/student/ATS/jamr/tools/cdec-2014-10-12/utils'
Makefile:480: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/student/ATS/jamr/tools/cdec-2014-10-12'
Makefile:410: recipe for target 'all' failed
make: *** [all] Error 2

I tried sudo make, simple ./configure and make clean;make. No help. This is make file.

arved
  • 4,401
  • 4
  • 30
  • 53
Ritwik
  • 521
  • 7
  • 17
  • Please post the relevant Makefiles. Most likely a variable is not set, which should have been set. – arved Apr 06 '18 at 11:58
  • My system is stuck in login loop at startup, once I solve that I'll post the make files. I remember there were 3, I posted 1 of them above. – Ritwik Apr 09 '18 at 16:04

1 Answers1

0

When you are in the cdec folder and you try to execute the commands there according to the instructions, we see that you get the collect2 error: error: ld returned 1 exit status. In the cdec folder, i initially execute the command:

gcc -std=gnu99 -Wall -Werror -g array_product.c -o array_product -I../../ZDK -L../../ZDK -I../../TestLib04 -L../../TestLib04 -ltestlib04 -lzdk -lncurses -lm

After this command, the error is solved and i get to the file and it says:

> First, you need all the build dependencies, and the fastest way to install them all is this command, which installs not only the compiler but the additional boost libraries and Flex that you'll need. sudo apt-get install build-essential libboost-all-dev cmake flex

> Secondly, create a directory and go into it (you said ~/prefix/sw in your comments).

> Thirdly, git clone https://github.com/redpony/cdec.git

> Fourthly, you probably did not read the README page on the GitHub repository which explains what commands to run to make the software build. It lists these as the build steps, after cd-ing into the newly created cdec folder.

Fithe_Xanki
  • 107
  • 1
  • 4