Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Build a shared library for DS5

Altera_Forum
Honored Contributor II
1,400 Views

I am trying to run the Armadillo Linear Algebra package on my Cyclone V. 

 

I get it to work with general Linux GCC 

 

Invoking: GCC C++ Compiler g++ -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Armadillo_Test.d" -MT"src/Armadillo_Test.d" -o "src/Armadillo_Test.o" "../src/Armadillo_Test.cpp" Finished building: ../src/Armadillo_Test.cpp Building target: Armadillo_Test Invoking: GCC C++ Linker g++ -L/usr/lib64 -o "Armadillo_Test" ./src/Armadillo_Test.o -lm -larmadillo -llapack -lblas -larpack Finished building target: Armadillo_Test 

 

Then I try to build for DS5 and the cyclone board 

 

Invoking: GCC C++ Compiler arm-linux-gnueabihf-g++ -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Armadillo_Test.d" -MT"src/Armadillo_Test.d" -o "src/Armadillo_Test.o" "../src/Armadillo_Test.cpp" Finished building: ../src/Armadillo_Test.cpp Building target: Armadillo_Test Invoking: GCC C++ Linker arm-linux-gnueabihf-g++ -L/usr/lib64 -o "Armadillo_Test" ./src/Armadillo_Test.o -lm -larmadillo -llapack -lblas -larpack /usr/lib64/libarmadillo.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status 

 

Any ideas what I could try?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
689 Views

Does anyone know if the cross compiler, which comes with the Yocto, should build up the correct library? I followed this but step two fails. 

 

http://stackoverflow.com/questions/21263427/cross-compiling-armadillo-linear-algebra-library 

 

Will I need to get another? My error is: 

gcc: error trying to exec 'cc1': execvp: No such File or directory
0 Kudos
Altera_Forum
Honored Contributor II
689 Views

That error indicates that GCC can't find one of the files it needs to do compiling. It isn't related to the library you are trying to build. You will find that you can't compile anything.  

 

I've seen that error before when environment variables GCC needs weren't set correctly. Unfortunately, I don't know how to fix this for Yocto. Is there a script you need to run to set it up?
0 Kudos
Reply