DerekQXu / General_Motion_Classifier_ML

Motion Classification with Sensortile Beaglebone System
3 stars 0 forks source link

code issue #1

Open natechong opened 5 years ago

natechong commented 5 years ago

Hi when i trying to make the program, there is a problem happened shown like this : joe@joe-usb:~/Desktop/General_Motion_Classifier_ML-master$ make gcc -lc -lm -lliquid -pthread -o main main.c main.c: In function ‘init_BLE’: main.c:84:5: warning: null argument where non-null required (argument 2) [-Wnonnull] execv("./bctl_auto.sh", NULL); ^~~~~ main.c: In function ‘ML_driver_tr’: main.c:372:5: warning: null argument where non-null required (argument 2) [-Wnonnull] execv("./train_auto.py", NULL); ^~~~~ /tmp/ccglHGTW.o: In function init_filter': main.c:(.text+0x545): undefined reference to iirfilt_crcf_create_prototype' main.c:(.text+0x582): undefined reference to iirfilt_crcf_create_prototype' main.c:(.text+0x5bf): undefined reference to iirfilt_crcf_create_prototype' /tmp/ccglHGTW.o: In function parse_and_filter': main.c:(.text+0x951): undefined reference to iirfilt_crcf_execute' main.c:(.text+0xa0b): undefined reference to iirfilt_crcf_execute' main.c:(.text+0xac7): undefined reference to iirfilt_crcf_execute' collect2: error: ld returned 1 exit status Makefile:5: recipe for target 'build' failed make: *** [build] Error 1 is there any solution to solve this issue? i am the new guy for BLE project, so maybe i cannot understand the complex problem.

DerekQXu commented 5 years ago

Thanks for bringing up this issue!

I recently tried rebuilding this project with $make program, and did not receive any errors, using the most recent liquid-dsp build (https://github.com/jgaeddert/liquid-dsp) and gcc version6.3.0.

I am unsure about the nonnull warning, but the project should still be runnable with or without it. The execv line calls other scripts to be executed from the C file. You could try to see if the sample code from this link (https://stackoverflow.com/questions/32142164/how-to-use-execv-system-call-in-linux) works or not, but I don't believe your error is from here.

I believe this error is most likely caused from your liquid-dsp distribution. Try navigating to the installation folder for liquid-dsp and running: $ sudo make check It is OK if there are warnings, but not if there are errors.

If you have errors I would recommend uninstalling liquid-dsp and reinstalling it with (as seen on the liquid-dsp github page): $ sudo apt-get install autotools-dev $ sudo apt-get install automake $ git clone $ cd liquid-dsp $ ./bootstrap $ ./configure $ make $ sudo make install $ sudo ldconfig

Hope this helps!