EECS-NTNU / bismo

BISMO: A Scalable Bit-Serial Matrix Multiplication Overlay for Reconfigurable Computing
BSD 3-Clause "New" or "Revised" License
131 stars 30 forks source link

Compilation cannot find -lsds_lib on Pynq 2.4 #3

Closed riple closed 5 years ago

riple commented 5 years ago

I am trying Pynq 2.4, and I ran into this: _/usr/bin/arm-linux-gnueabihf-ld: cannot find -lsdslib collect2: error: ld returned 1 exit status

The command I am running is: ./compile_sw.sh, which invokes _g++ -std=c++11 *.cpp -lsdslib -o app

I am using the rootfs from https://www.xilinx.com/member/forms/download/xef.html?filename=pynq_rootfs_arm_v2.4.zip

maltanar commented 5 years ago

This release was tested with v1.4 only, but you can try replacing the -lsds_lib with -lcma and see if this resolves the issue.

riple commented 5 years ago

Hi maltanar,

I changed the script to -lcma, and it complains about: /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference to pthread_spin_init' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference topthread_spin_unlock' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference to pthread_create' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference topthread_key_create' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference to pthread_getspecific' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference topthread_spin_lock' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference to pthread_spin_destroy' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference topthread_join' /usr/lib/gcc/arm-linux-gnueabihf/7/../../../../lib/libcma.so: undefined reference to `pthread_setspecific'

is there a header file that I should include?

maltanar commented 5 years ago

Sounds like you may need the -pthread option passed to g++ as well.

riple commented 5 years ago

Great! It works now. Thank you, maltanar!