mhx / dwarfs

A fast high compression read-only file system for Linux, Windows and macOS
GNU General Public License v3.0
2.13k stars 56 forks source link

Latest git failing to build due to thrift #146

Closed Phantop closed 1 year ago

Phantop commented 1 year ago

As the title says. I'm seeing this issue specifically while building via the AUR's dwarfs-git PKGBUILD. It has built fine prior to 0.7.0-RC5. Error is as below:

[ 79%] Built target thrift1
[ 80%] Building CXX object folly/CMakeFiles/folly_base.dir/folly/system/ThreadId.cpp.o
[ 80%] Building CXX object folly/CMakeFiles/folly_base.dir/folly/system/ThreadName.cpp.o
[ 80%] Building CXX object folly/CMakeFiles/folly_base.dir/folly/tracing/AsyncStack.cpp.o
[ 80%] Building CXX object folly/CMakeFiles/folly_base.dir/folly/io/async/test/ScopedBoundPort.cpp.o
[ 80%] Building CXX object folly/CMakeFiles/folly_base.dir/folly/io/async/test/SocketPair.cpp.o
[ 80%] Building CXX object folly/CMakeFiles/folly_base.dir/folly/io/async/test/TimeUtil.cpp.o
[ 81%] Building ASM object folly/CMakeFiles/folly_base.dir/folly/memcpy.S.o
[ 81%] Built target folly_base
[ 82%] Linking CXX static library libfolly.a
[ 82%] Built target folly
[ 82%] Generating thrift/lib/thrift/gen-cpp2/frozen_data.h, thrift/lib/thrift/gen-cpp2/frozen_data.cpp, thrift/lib/thrift/gen-cpp2/frozen_types.h, thrift/lib/thrift/gen-cpp2/frozen_types.tcc, thrift/lib/thrift/gen-cpp2/frozen_types.cpp, thrift/lib/thrift/gen-cpp2/frozen_types_custom_protocol.h, thrift/lib/thrift/gen-cpp2/frozen_constants.h, thrift/lib/thrift/gen-cpp2/frozen_constants.cpp, thrift/lib/thrift/gen-cpp2/frozen_metadata.h, thrift/lib/thrift/gen-cpp2/frozen_metadata.cpp, thrift/lib/thrift/gen-cpp2/frozen_visitation.h, thrift/lib/thrift/gen-cpp2/frozen_for_each_field.h, thrift/lib/thrift/gen-cpp2/frozen_visit_union.h
/bin/sh: line 1: cd: /home/glados/Downloads/dwarfs-git/src/build/thrift/lib/thrift: No such file or directory
make[2]: *** [CMakeFiles/thrift_light.dir/build.make:75: thrift/lib/thrift/gen-cpp2/frozen_data.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:751: CMakeFiles/thrift_light.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 82%] Building CXX object folly/folly/experimental/exception_tracer/CMakeFiles/folly_exception_tracer_base.dir/ExceptionTracer.cpp.o
[ 82%] Building CXX object folly/folly/experimental/exception_tracer/CMakeFiles/folly_exception_tracer_base.dir/StackTrace.cpp.o
[ 82%] Linking CXX static library libfolly_exception_tracer_base.a
[ 82%] Built target folly_exception_tracer_base
make: *** [Makefile:156: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
zeddy1267 commented 1 year ago

Can confirm. I am having the exact same issue via following the build instructions in the readme, and also with trying to use my Gentoo ebuild.

mhx commented 1 year ago

Oh, you're building using make! I haven't done this in a while, I was assuming that if it built with ninja, it'd also be fine building with make. :)

Fixed in 7c1eee812.

mhx commented 1 year ago

Also, thanks for noticing and sorry for the trouble!

Phantop commented 1 year ago

So the thrift issues are gone but there is a new issue that happens with both make and ninja. I've attached the output of building via the same PKGBUILD edited to use Ninja. out.txt

mhx commented 1 year ago

Sorry, I've fixed the typo in 8c32ac8.

I'm a bit surprised that this code was actually compiled as it should only be enabled in a debug build?

Phantop commented 1 year ago

Looking at the source for the PKGBUILD, it seems to set build type to 'None' while the CMakeLists seems to want it to be 'Release'. Would that be a reasonable cause of this?

mhx commented 1 year ago

Looking at the source for the PKGBUILD, it seems to set build type to 'None' while the CMakeLists seems to want it to be 'Release'. Would that be a reasonable cause of this?

Yeah, None means "just take whatever flags are set in the environment". I don't know what flags that would be, though. If optimisations are not enabled, you might end up with a pretty slow binary. The assertions compiled into the code will also add to both binary size and run time.

mhx commented 1 year ago

I've worked on setting up a CI pipeline to avoid these kinds of issues in the future. :)