Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 774039 - app-forensics/sleuthkit-4.10.1: compile fails
Summary: app-forensics/sleuthkit-4.10.1: compile fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Göktürk Yüksek
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-03 09:35 UTC by ganooslashlinus
Modified: 2021-03-06 06:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,9.30 KB, application/x-info)
2021-03-03 09:35 UTC, ganooslashlinus
Details
build.log (build.log,370.72 KB, text/x-log)
2021-03-06 04:27 UTC, ganooslashlinus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ganooslashlinus 2021-03-03 09:35:11 UTC
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.
Comment 1 Göktürk Yüksek archtester gentoo-dev 2021-03-06 03:34:43 UTC
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.
Comment 2 ganooslashlinus 2021-03-06 04:27:45 UTC
Created attachment 689589 [details]
build.log

Build log as requested.
Comment 3 Göktürk Yüksek archtester gentoo-dev 2021-03-06 04:56:13 UTC
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.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-06 05:05:04 UTC
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.
Comment 5 Larry the Git Cow gentoo-dev 2021-03-06 06:04:23 UTC
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(-)
Comment 6 Göktürk Yüksek archtester gentoo-dev 2021-03-06 06:05:11 UTC
Feel free to re-open if it's still broken for you.