publicarray / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com/
Other
67 stars 14 forks source link

Unable to compile i2pd #6

Open xaozai opened 5 years ago

xaozai commented 5 years ago

Hello! Could you please compile i2pd 2.23 for arch-88f6281-6.2 or arch-88f6281-6.1. I can't do it :(

publicarray commented 5 years ago

Unfortunately I do not have the bandwidth/space at the moment to download an additional toolchain. If you get an error can you please tell me what it is?

Here are the steps to compile i2pd:

# Install docker
docker pull synocommunity/spksrc
git clone https://github.com/publicarray/spksrc.git
cd spksrc
docker run -it --rm -v $(pwd):/spksrc synocommunity/spksrc /bin/bash
cd spk/i2pd
make arch-88f6281-6.1

Note it can take easily take longer than a few hours to compile all of the dependencies (zlib, openssl and boost) with docker. You can try to use make -j 4 to use multiple jobs, but use it at your own risk.

publicarray commented 5 years ago

Actually never mind I can get circleCI to build the package

publicarray commented 5 years ago

I received this error while building in circleCI.

-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   program_options
--   date_time
-- Found OpenSSL: /spksrc/spk/i2pd/work-88f6281-6.1/install/usr/local/i2pd/lib/libssl.a;/spksrc/spk/i2pd/work-88f6281-6.1/install/usr/local/i2pd/lib/libcrypto.a (found version "1.0.2n") 
-- Found ZLIB: /spksrc/spk/i2pd/work-88f6281-6.1/install/usr/local/i2pd/lib/libz.a (found version "1.2.8") 
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
-- Looking for __atomic_load_8 in atomic
-- Looking for __atomic_load_8 in atomic - not found
CMake Error at cmake_modules/CheckAtomic.cmake:74 (message):
  Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
  CMakeLists.txt:403 (include)

-- Configuring incomplete, errors occurred!
See also "/spksrc/spk/i2pd/work-88f6281-6.1/i2pd-2.23.0/CMakeFiles/CMakeOutput.log".
See also "/spksrc/spk/i2pd/work-88f6281-6.1/i2pd-2.23.0/CMakeFiles/CMakeError.log".

So If I read this right, the compiler from the 88f6281-6.1 toolchain can't compile boost because it doesn't come with libatomic. I'm now trying the 6.2 toolchain. If this doesn't work you can try building with https://github.com/ivmai/libatomic_ops.

publicarray commented 5 years ago

Yea the 6.2 toolchain returns the same error

xaozai commented 5 years ago

Either the kernel is too old or the compiler is too old, but the resulting binary does not work on DiskStation. I compile with static linking аnd "$ file i2pd" says it's linked statically, but on DiskStation it displays a message that libatomic, libstd++ libraries are not found, etc.

xaozai commented 5 years ago

I ran a java client on my model. I'll use it...