I am missing some essential components when building nodejs serialport.
I am running Colibri iMX6ULL module with a fresh copy of Linux Console Image 2.8b3.111
I load the follwing packages:
# opkg install nodejs nodejs-npm
# opkg install python-dev python-misc python-compiler python-multiprocessing
# opkg install packagegroup-core-buildessential packagegroup-sdk-target gcc-dev
I run the follwing npm commands:
# npm init
# npm install node-gyp node-pre-gyp rebuild
# npm install serialport --unsafe-perm --build-from-source
I get the following error:
/usr/lib/gcc/arm-angstrom-linux-gnueabi/7.2.0/../../../../arm-angstrom-linux-gnueabi/bin/ld: error: cannot open crtbeginS.o: No such file or directory
/usr/lib/gcc/arm-angstrom-linux-gnueabi/7.2.0/../../../../arm-angstrom-linux-gnueabi/bin/ld: error: cannot open crtendS.o: No such file or directory
/usr/lib/gcc/arm-angstrom-linux-gnueabi/7.2.0/../../../../arm-angstrom-linux-gnueabi/bin/ld: error: cannot find -lgcc_s
/usr/lib/gcc/arm-angstrom-linux-gnueabi/7.2.0/../../../../arm-angstrom-linux-gnueabi/bin/ld: error: cannot find -lgcc_s
/usr/lib/gcc/arm-angstrom-linux-gnueabi/7.2.0/../../../../arm-angstrom-linux-gnueabi/bin/ld: error: Release/obj.target/serialport/src/poller.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
Release/obj.target/serialport/src/poller.o:poller.cpp:function Poller::New(Nan::FunctionCallbackInfo<v8::Value> const&): error: undefined reference to '__dso_handle'
Release/obj.target/serialport/src/poller.o:poller.cpp:function Poller::Init(v8::Local<v8::Object>): error: undefined reference to '__dso_handle'
I created symlink # ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so . This removes the errors related to -lgcc_s but the other errors remain.
There is no reference to crtbeginS or crtendS on the system.
- Where can i source crtbeginS.o and crtendS.o from. What package are they in?
- How can I specific the -fPIC flag. The source code for serialport that includes poller.cpp is downloaded when “# npm install serialport” is executed, and when it fails, the code is no longer on the system.
Thanks for your help