Created attachment 689196 [details] emerge --info Sleuthkit-4.10.1 withs USE="ewf" doesn't compile due to linker errors. Kinda strange as it compiles just fine on another computer with a similar setup and gcc version. Errors: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../tsk/.libs/libtsk.so: undefined reference to `libewf_handle_read_random' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../tsk/.libs/libtsk.so: undefined reference to `libewf_handle_read_random' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:426: img_stat] Error 1 make[2]: *** Waiting for unfinished jobs.... collect2: error: ld returned 1 exit status make[2]: *** [Makefile:422: img_cat] Error 1 make[2]: Leaving directory '/var/tmp/portage/app-forensics/sleuthkit-4.10.1/work/sleuthkit-4.10.1/tools/imgtools' make[1]: *** [Makefile:382: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/app-forensics/sleuthkit-4.10.1/work/sleuthkit-4.10.1/tools' make: *** [Makefile:558: all-recursive] Error 1 !!! When you file a bug report, please include the following information: GENTOO_VM=openjdk-8 CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8" JAVACFLAGS="-source 1.8 -target 1.8" COMPILER="" emerge --info is attached.
Can you attach the build log as well? I cannot reproduce this on my local machine, I need to dig into your logs. In my libewf.a, I can see the symbol as globally defined: 418: 0000000000004b50 160 FUNC GLOBAL DEFAULT 1 libewf_handle_read_random I thought maybe the culript is '--as-needed' but compiles with that as well.
Created attachment 689589 [details] build.log Build log as requested.
Sigh, this is most likely caused by some build system stupidity. We explicitly pass '--with-libewf=/var/tmp/portage/app-forensics/sleuthkit-4.10.1/temp/image' to configure but somehow the build system still picks up your local copy: libtool: link: x86_64-pc-linux-gnu-g++ -std=c++14 -Wall -Wextra -Wno-unused-parameter -Wno-unused-command-line-argument -march=native -O2 -pipe -Wl,-O1 -Wl,-O1 -pthread -o .libs/img_cat img_cat.o -Wl,--as-needed -L/usr/local/lib -L/var/tmp/portage/app-forensics/sleuthkit-4.10.1/temp/image/lib ../../tsk/.libs/libtsk.so /usr/local/lib/libewf.so -lcrypto -lpthread -lbz2 -lz -lsqlite3 -ldl -lstdc++ -pthread See the '/usr/local/lib/libewf.so' in the command above. It shouldn't be checking '/usr/local' in the first place. Let me look into it a bit more.
Note that having anything in /usr/local/* is asking for pain. Although it's for personal use, build systems of course go quite far when trying to honour this, even when building system packages, which ends up causing various problems. So, there's a real bug here, in that the build system should consider /usr/local/* last (for our purposes, anyway), but having anything in /usr/local/* as a user is kind of a time bomb. Sometimes (like here, but often even worse) it's not obvious at all that it's even the problem, e.g. when binaries shadow system ones and you get very confusing errors because you forgot about them.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94f63965388a020f284c0bfb1644137f5f6c5690 commit 94f63965388a020f284c0bfb1644137f5f6c5690 Author: Göktürk Yüksek <gokturk@gentoo.org> AuthorDate: 2021-03-06 06:00:14 +0000 Commit: Göktürk Yüksek <gokturk@gentoo.org> CommitDate: 2021-03-06 06:04:06 +0000 app-forensics/sleuthkit: prevent build the system from sourcing /usr/local Closes: https://bugs.gentoo.org/774039 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org> .../files/sleuthkit-4.10.1-exclude-usr-local.patch | 28 ++++++++++++++++++++++ ...it-4.10.1.ebuild => sleuthkit-4.10.1-r1.ebuild} | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-)
Feel free to re-open if it's still broken for you.