Cant cross compile using Cygwin and Linaro

104 views
Skip to first unread message

Joe Mulligan

unread,
Oct 19, 2018, 4:45:00 PM10/19/18
to Protocol Buffers
Hello, 
This may not be a protobuf issue per se, but I'm hoping someone else knows how to solve this problem.
It's cost me over a day now.

The situation is that I am trying to cross-compiler protobuf 3 for an ARM target.
The host system is Windows, but I am running in a CYGWIN environment, using the Linaro arm cross tools.
My configure command is:
./configure --build=i686-pc-cygwin --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf CXXFLAGS=-std=gnu++11 CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ --with-protoc=/usr/bin/protoc --prefix=/home/Admin/protobuf_build

The failure is that at some point int the build process,  (for libprotoc.la), arm-linux-gnueabihf-g++ is going to try to pull in src/.libs/libprotobuf.so, which is a link to libprotobuf.so.17.0.0.
If, under Cygwin, I specify native links, then the error is:
    /.libs/libprotobuf.so: file format not recognized; treating as linker script

If I use Cygwin=winlinks ( so the link is a shortcut ), then the file is not found.

Playing with the command line, it looks like the Linaro compiler cant deal with symbolic links of any kind under Cygwin, unless it is process through the cygpath command.
Is there any way this can be configured ? or is there another known solution to this ?  I've tried to contact Linaro, but there hasn't been a response.

Thanks, 
Joe

Mac Pham

unread,
Jan 28, 2020, 4:36:07 PM1/28/20
to Protocol Buffers
try this  --target=aarch64-linux-gnu

-Tom
Reply all
Reply to author
Forward
0 new messages