I'm trying to cross compile StrongSwan package on Ubuntu for Synology NAS using official Synology toolchain.

hostname = ubuntu
uname -m = i686
uname -r = 3.8.0-32-generic
uname -s = Linux

- model DS213+
- CPU: Freescale QorIQ P1022
- Arch: PowerPC
- Endianness: Big Endian
- Linux 2.6.32
- uname -a:
Linux LupoDiskStation #3776 SMP Sat Aug 17 02:11:24 CST 2013 ppc
GNU/Linux synology_qoriq_213+

When I run ./configure, I get error:

configure: error: GNU Multi Precision library gmp not found

Configure command:

env CC=/usr/local/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-gcc \
LD=/usr/local/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-ld \ 
RANLIB=/usr/local/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-ranlib \ 
CFLAGS="-I/usr/local/powerpc-none-linux-gnuspe/include -mcpu=8548 -mhard-float -mfloat-gprs=double" \ 
LDFLAGS="-L/usr/local/powerpc-none-linux-gnuspe/lib" \ 
./configure \ 
--host=powerpc-unknown-linux \ 
--target=powerpc-unknown-linux \ 
--build=i686-pc-linux \ 

If I run ./configure without extra parameters (with ubuntu gcc), I get no errors. I can also successfully compile helloworld.c with synology toolchain.

I've following GMP packages installed:

dpkg --get-selections | grep gmp
gmpc                        install
gmpc-data                   install
gmpc-dev                    install
libgmp-dev                  install
libgmp10                    install
libgmp3-dev                 install
libgmp3c2                   install
libgmpada2                  install
libgmpxx4ldbl                   install

Header file is under /usr/include/gmp.h.

Any idea how to include that gmp.h ?


Maybe this will help in Ubuntu 18.04?

sudo apt install libgmp-dev

  • 1
    Confirmed working – h22 Jun 28 at 13:14

Ok so I read into the configure file try.

./configure \ 
--host=powerpc-unknown-linux \ 
--target=powerpc-unknown-linux \ 
--build=i686-pc-linux \ 
--prefix=/usr/local \
  • I've added --libdir="/usr/include" to the end of my configure command (including other flags: CC=/usr/local/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-gcc, ...) but it doesn't help. Maybe it would work if I replace original GCC commands with links to "powerpc-none-linux-gnuspe-gcc" or something ? – OldFox Nov 20 '13 at 17:57

It's working now. I had to download gmp, cross compile it and copy files to /usr/local/powerpc-none-linux-gnuspe/include dir.

  • how did you do all that? – tatsu May 24 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.