Closed simleo closed 4 years ago
Show me the summary from cmake
Adding the cmake
output as an attachment.
eddl_superbuild_nozlib_cmake.log
It looks correct. Can you send the output of the compilation?
-- ===========================================
-- ===========================================
-- Project name: eddl
-- Project version: 0.5
-- Prefix path:
-- Install prefix: /usr/local
-- -------------------------------------------
-- Build target: CPU
-- Build type: Release
-- Build shared libs: ON
-- Build coverage: OFF
-- -------------------------------------------
-- C++ compiler: GNU (/usr/bin/c++)
-- C++ flags:
-- C++ flags (release): -O3
-- C++ flags (debug): -O0 -g
-- -------------------------------------------
-- CUDA enabled: OFF
-- -------------------------------------------
-- OpenMP enabled: ON
-- OpenMP version: 4
-- OpenMP gomp library: /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so
-- OpenMP pthread library: /usr/lib/x86_64-linux-gnu/libpthread.so
-- -------------------------------------------
-- Eigen3 dir: /eddl/build/cmake/third_party/eigen/share/eigen3/cmake
-- Eigen3 include: /eddl/build/cmake/third_party/eigen/include/eigen3
-- -------------------------------------------
-- ZLIB root: /eddl/build/cmake/third_party/zlib
-- ZLIB include: /eddl/build/cmake/third_party/zlib/include
-- ZLIB libraries: z
-- -------------------------------------------
-- Use Protobuf: ON
-- Protobuf dir: /eddl/build/cmake/third_party/protobuf/lib/cmake/protobuf
-- Protobuf include: /eddl/build/cmake/third_party/protobuf/include
-- Protobuf libraries: protobuf
-- Protobuf compiler: /eddl/build/cmake/third_party/protobuf/bin/protoc
-- ===========================================
-- ===========================================
-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /eddl/build
make
output attached.
eddl_superbuild_nozlib_make.log
@simleo Can you check this again, after the changes made in the previous pull request (already merged in master).
@CostantinoGrana I checked again on the master branch. Now the installation works without manually installing zlib1g-dev
. However:
# ldd /usr/local/lib/libeddl.so
linux-vdso.so.1 (0x00007ffee4df5000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe33f4f7000)
libprotobuf.so.3.11.4.0 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe33f2d8000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fe33f0a9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe33ed20000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe33e982000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe33e76a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe33e379000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe33fb47000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe33e175000)
libz and libprotobuf are not statically linked anymore, which I think was @salvacarrion 's purpose with the superbuild.
Yes, that was the main purpose of the superbuild since the conda environment already worked pretty well.
You can ignore the zlib static linking because it is only used to read Numpy arrays (for protobuf is disabled) and pretty soon we will remove the numpy support (on the C++ side) as it is not officially supported.
@simleo Wait, isn't the purpose of BUILD_SHARED_LIBS to tell that you want shared libs? If you set it (default) zlib should use the shared version, right?
Sort of, but with a nuance for those dependencies. The point of setting the other libraries as static with the fPIC flag (only for the superbuild), was so that they could be embedded in the EDDL library. Then, this EDDL library could be either shared or static.
I'm closing this issue to open a more general one
If my understanding is correct, the new superbuild mode should automatically get all dependencies needed to build the library. However, it looks like zlib still needs to be installed beforehand.
Starting from scratch on Ubuntu 18.04 I only install the following: build-essential, ca-certificates, wget, git and cmake (3.14.5). I run cmake with
cmake -D BUILD_SUPERBUILD=ON -DBUILD_TESTS=OFF
, and the output shows zlib being fetched and installed (in acmake/third_party/zlib
relative dir). However,make
eventually fails with:If I also install
zlib1g-dev
before running cmake and make, instead, there are no errors.All of the above has been tried with EDDL v0.5.4a.