1

I don't know whether IPOPT can support cross-compilation on the ARM64 architecture. When I try to cross-compile on the ARM64 architecture, an error occurs. I don't know where the problem is.My compilation environment is the aarch64-linux-gnu compiler used by ubuntu18.04. At present, I have successfully cross-compiled blas, lapack, coinhsl, coinasl and mumps libraries. The file command shows the aarch64 architecture, and an error occurs when compiling IPOPT as follows:

make[2]: 进入目录“/home/gzy/casadicompile/Ipopt-releases-3.13.0/build/src/Apps/AmplSolver”
  CXX      ampl_ipopt.o
  CXX      AmplTNLP.lo
  CXXLD    libipoptamplinterface.la
libtool: warning: '/home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/lib/../lib64/libstdc++.la' seems to be moved
libtool: warning: library '/home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/lib/../lib64/libstdc++.la' was moved.
  CXXLD    ipopt
libtool: warning: library '/home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/lib/../lib64/libstdc++.la' was moved.
libtool: warning: library '/home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/lib/../lib64/libstdc++.la' was moved.
/home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/bin/ld: /home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/lib/../lib64/libstdc++.so: undefined reference to `fstat64@GLIBC_2.33'
/home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/bin/ld: /home/gzy/casadicompile/arm64compiler/aarch64-linux-gnu-master/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/lib/../lib64/libstdc++.so: undefined reference to `pthread_key_create@GLIBC_2.34'`

I hope to find a suitable solution and whether IPOPT supports cross compilation for aarch64 architecture

郭中一
  • 11
  • 1

1 Answers1

0

I think its a libstdc version issue, to fix this, u may

  1. use ldd --version to see what version u have & what version is needed check
  2. check environment variables, some libraries may require specific environment variables, go to documentation and find it
  3. try to compile it on native arm64 devices

hope 3 steps helps u

  • I think this is the reason. It may be because I use the gcc7.5 version of the compiler and the version of the glib library is relatively low. I will try to upgrade the version first. Thank you for guiding me in the direction. – 郭中一 Mar 30 '23 at 11:35