From 5dbf94e49be4cc93c5a5828f4b25b23ee105f5e1 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Wed, 29 Oct 2025 11:14:58 -0700 Subject: [PATCH] Update README.SRC to enable success by newbies. Need i386 version of zlib, updated libmfpr.so, g++ (not clang++). https://github.com/upx/upx/issues/938 modified: README.SRC --- README.SRC | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.SRC b/README.SRC index 0c8e168b..4a6a4e7e 100644 --- a/README.SRC +++ b/README.SRC @@ -81,6 +81,15 @@ Developer quick start 4b) $ wget https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz # Extract to $HOME/bin/bin-upx or $HOME/local/bin/bin-upx. # See directions in: https://github.com/upx/upx-stubtools + + # Some of the pre-built tools need i386 libz. On Ubuntu: + # # dpkg --add-architecture i386 + # # apt-get update + # # apt-get install zlib1g-dev + + # aarch64-linux-gnu/4.9.2/cc1 needs libmpfr.so.4. Make a symlink: + # # ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4 + 4c) $ make clean; make # verify that you can re-build stubs 4d) $ popd # my-upx 5) $ cd upx # my-upx/upx @@ -92,7 +101,18 @@ Developer quick start # If stuck, then reset via "rm -rf vendor; git submodule update --init". 7) $ mkdir -p build/debug build/release 8) $ pushd build/debug # my-upx/upx/build/debug - 9) $ cmake ../.. # configure cmake + +9a) Install GNU g++ so that it is used when invoking "c++" compiler. + On Ubuntu 24.04 with + cmake: cmake version 3.28.3 + g++: Ubuntu clang version 18.1.3 (1ubuntu1) + /lib/llvm-18/lib/cmake/llvm/HandleLLVMOptions.cmake: + add_flag_if_supported("-fno-lifetime-dse" CMAKE_CXX_FLAGS) + then cmake invoking c++ uses -fno-lifetime-dse but gets + c++: error: unknown argument: '-fno-lifetime-dse' + Commenting out the "add_flag_if_supported' line still uses that unknown argument. + Installing g++ avoids the problem. +9b) $ cmake ../.. # configure cmake 10) $ cmake --build . --verbose # optional "--verbose" # This relies on stub/*.h, which YOU must re-build if necessary. # When in doubt, then use "cd src/stub; make clean; make".