linux - Arduino SD library arduino-core 1:1.0.0.1+dfsg-7 undefined reference -
i'm trying compile dumpfile example on raspbian using arduino-core , arduino-mk packages.
it worked other projects, when comes using sd library have errors @ compilation time, don't know if it's wrong or if it's issue in sd library itself.
from changelog of arduino-core package, there nothing fixed in sd library between version of package , recent one. upgrading may not help.
i'm copying output of running >make
/usr/bin/avr-gcc -c -mmcu=atmega328p -df_cpu=16000000l -darduino=100 -i. -i/usr/share/arduino/hardware/arduino/cores/arduino -i/usr/share/arduino/hardware/arduino/variants/standard -i/usr/share/arduino/libraries/sd -i/home/pi/sketchbook/libraries/sd -g -os -w -wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/libraries/sd/file.cpp -o build-cli/libs/sd/file.o mkdir -p build-cli/libs/sd/ /usr/bin/avr-gcc -c -mmcu=atmega328p -df_cpu=16000000l -darduino=100 -i. -i/usr/share/arduino/hardware/arduino/cores/arduino -i/usr/share/arduino/hardware/arduino/variants/standard -i/usr/share/arduino/libraries/sd -i/home/pi/sketchbook/libraries/sd -g -os -w -wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/libraries/sd/sd.cpp -o build-cli/libs/sd/sd.o /usr/bin/avr-ar rcs build-cli/libcore.a build-cli/winterrupts.o build-cli/wiring_analog.o build-cli/wiring.o build-cli/wiring_digital.o build-cli/wiring_pulse.o build-cli/wiring_shift.o build-cli/cdc.o build-cli/hardwareserial.o build-cli/hid.o build-cli/ipaddress.o build-cli/main.o build-cli/new.o build-cli/print.o build-cli/stream.o build-cli/tone.o build-cli/usbcore.o build-cli/wmath.o build-cli/wstring.o build-cli/libs/sd/file.o build-cli/libs/sd/sd.o /usr/bin/avr-gcc -mmcu=atmega328p -wl,--gc-sections -os -o build-cli/readsd.elf build-cli/readsd.o build-cli/libcore.a -lc -lm build-cli/libcore.a(file.o): in function `file::operator bool()': /usr/share/arduino/libraries/sd/file.cpp:146: undefined reference `sdfile::sync()' /usr/share/arduino/libraries/sd/file.cpp:148: undefined reference `sdfile::write(void const*, unsigned int)' build-cli/libcore.a(file.o): in function `file::operator bool()': /usr/share/arduino/libraries/sd/utility/sdfat.h:214: undefined reference `sdfile::read(void*, unsigned int)' build-cli/libcore.a(file.o): in function `file::operator bool()': /usr/share/arduino/libraries/sd/file.cpp:149: undefined reference `sdfile::seekset(unsigned long)' build-cli/libcore.a(file.o): in function `file::operator bool()': /usr/share/arduino/libraries/sd/utility/sdfat.h:214: undefined reference `sdfile::close()' build-cli/libcore.a(sd.o): in function `_global__sub_i__z20getnextpathcomponentpcpjs_': /usr/share/arduino/libraries/sd/utility/sd2card.h:155: undefined reference `sd2card::init(unsigned char, unsigned char)' build-cli/libcore.a(sd.o): in function `_global__sub_i__z20getnextpathcomponentpcpjs_': /usr/share/arduino/libraries/sd/utility/sdfat.h:430: undefined reference `sdvolume::init(sd2card*, unsigned char)' build-cli/libcore.a(sd.o): in function `_global__sub_i__z20getnextpathcomponentpcpjs_': /usr/share/arduino/hardware/arduino/cores/arduino/print.h:43: undefined reference `sdfile::openroot(sdvolume*)' build-cli/libcore.a(sd.o): in function `_global__sub_i__z20getnextpathcomponentpcpjs_': /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdvolume::init(sd2card*, unsigned char)' /usr/share/arduino/libraries/sd/utility/sdfat.h:430: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:430: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::close()' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::open(sdfile*, char const*, unsigned char)' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::close()' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::open(sdfile*, char const*, unsigned char)' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::open(sdfile*, char const*, unsigned char)' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::close()' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `sdfile::seekset(unsigned long)' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' /usr/share/arduino/libraries/sd/utility/sdfat.h:138: undefined reference `vtable sdfile' collect2: error: ld returned 1 exit status make: *** [build-cli/readsd.elf] error 1
could please me pinpoint @ issue?
thanks
note sd library has sub directory containing functions undefined. perhaps need add -i/usr/share/arduino/libraries/sd/utility make
Comments
Post a Comment