[Interest] Cross compiling for Pi with PostgreSQL

Jonathan Greig redteam316 at gmail.com
Sat Nov 4 04:40:59 CET 2017


Jonathan P. Greig
aka redteam316
RIP 6/13/1984 - 2/7/2016


On Tue, Sep 26, 2017 at 12:56 PM, Roland Hughes <roland at logikalsolutions.com
> wrote:

> All,
>
> Has anybody on this list managed to use the cross compilation instructions
> from either here:
> https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
> or here:
> https://wiki.qt.io/RaspberryPi2EGLFS
>
> and gotten PostgreSQL support to compile when the host is a 64-bit system
> and the target is 32-bit Pi?
>
> Both the wiki and that link seem horribly broken.
>
> You will notice the environment/path configuration is incorrect:
>
> ====
>
> checking for PostgreSQL...
>
> /home/roland/piBuild/pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/roland/piBuild/sysroot -O2 -Wall -W -fPIC  -I. -I/usr/include/postgresql -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o psql.o psql.cpp
>
> /home/roland/piBuild/pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/home/roland/piBuild/sysroot/opt/vc/lib -Wl,-rpath-link,/home/roland/piBuild/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/roland/piBuild/sysroot/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-O1 -o psql psql.o   --sysroot=/home/roland/piBuild/sysroot -L/usr/lib/x86_64-linux-gnu -lpq
>
> /usr/lib/x86_64-linux-gnu/libpq.so: file not recognized: File format not recognized
>
> collect2: error: ld returned 1 exit status
>
> Makefile:92: recipe for target 'psql' failed
>
> make: *** [psql] Error 1
>
> PostgreSQL disabled.
>
> PostgreSQL support cannot be enabled due to functionality tests!
>
>  Turn on verbose messaging (-v) to /home/roland/piBuild/qt-everywhere-opensource-src-5.7.1/qtbase/configure to see the final report.
>
>  If you believe this message is in error you may use the continue
>
>  switch (-continue) to /home/roland/piBuild/qt-everywhere-opensource-src-5.7.1/qtbase/configure to continue.
>
> roland at roland-desktop:~/piBuild/qt-everywhere-opensource-src-5.7.1$ cd /
>
> roland at roland-desktop:/$ sudo find -iname libpq.so
>
> [sudo] password for roland:
>
> ./usr/lib/x86_64-linux-gnu/libpq.so
>
> ./home/roland/piBuild/sysroot/usr/lib/arm-linux-gnueabihf/libpq.so
>
>
> ====
>
> Even after the library and required headers are installed on the Pi and
> the entire process is started from scratch the cross compile looks in the
> wrong place for the header (on the 64-bit machine) and the tries to link
> with the 64-bit version of the lib.
>
> Has anybody found the work around for this? Preferably a work around which
> does not require loop mounting the SD image.
>
> --
> Roland Hughes, President
> Logikal Solutions(630)-205-1593 <(630)%20205-1593>
> http://www.theminimumyouneedtoknow.comhttp://www.infiniteexposure.nethttp://www.johnsmith-book.comhttp://www.logikalblog.comhttp://www.interestingauthors.com/bloghttp://lesedi.us/http://onedollarcontentstore.com
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171103/acf423d2/attachment.html>


More information about the Interest mailing list