spksrc icon indicating copy to clipboard operation
spksrc copied to clipboard

Unable to compile i2pd

Open xaozai opened this issue 7 years ago • 6 comments

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

xaozai avatar Feb 23 '19 21:02 xaozai

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 avatar Feb 24 '19 02:02 publicarray

Actually never mind I can get circleCI to build the package

publicarray avatar Feb 24 '19 04:02 publicarray

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 avatar Feb 24 '19 05:02 publicarray

Yea the 6.2 toolchain returns the same error

publicarray avatar Feb 28 '19 05:02 publicarray

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 avatar Feb 28 '19 06:02 xaozai

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

xaozai avatar Mar 07 '19 10:03 xaozai