Open royshil opened 4 years ago
I've been able to get around the problem by adding
$ export CXX="${CXX} -Lmy-arm-sysroot/usr/lib"
$ npm install --loglevel=silly --arch=arm libpq
That way it finds the right libpq.so
for the target. It doesn't solve the actual problem though.
Hitting a GYP compilation problem when cross compiling:
Note that it's looking for
libpq.so
in the wrong location-lpq -L/usr/lib/x86_64-linux-gnu
- it's the host sysroot and not the target. This can be traced back to https://github.com/brianc/node-libpq/blob/master/binding.gyp Where:pg_config
is picked up from/usr/bin
- again the host. The following(https://github.com/brianc/node-libpq/blob/master/binding.gyp#L41) Returns:
Given we don't have
pg_config
for the target (e.g. it doesn't exist , or - it can't be executed on the host) - discovery of the shared library to link against cannot be done withpg_config
.Any help will be appreciated!