Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691926 - net-analyzer/nmap-7.80 with dev-libs/liblinear[blas] - make: *** No rule to make target 'liblinear/Makefile', needed by 'build-liblinear'. Stop.
Summary: net-analyzer/nmap-7.80 with dev-libs/liblinear[blas] - make: *** No rule to m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-11 07:11 UTC by Michał Górny
Modified: 2022-03-04 23:18 UTC (History)
6 users (show)

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


Attachments
/var/log/portage/net-analyzer:nmap-7.80:20190811-065854.log (net-analyzer:nmap-7.80:20190811-065854.log,47.14 KB, text/plain)
2019-08-11 07:11 UTC, Michał Górny
Details
emerge-info.txt (emerge-info.txt,10.30 KB, text/plain)
2019-08-11 07:12 UTC, Michał Górny
Details
config.log (config.log,71.20 KB, text/plain)
2019-08-11 08:19 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-08-11 07:11:56 UTC
Created attachment 586530 [details]
/var/log/portage/net-analyzer:nmap-7.80:20190811-065854.log

make -j12 AR=x86_64-pc-linux-gnu-ar RANLIB=x86_64-pc-linux-gnu-ranlib 
make: *** No rule to make target 'liblinear/Makefile', needed by 'build-liblinear'.  Stop.
make: *** Waiting for unfinished jobs....
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-08-11 07:12:43 UTC
Created attachment 586532 [details]
emerge-info.txt
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-08-11 07:58:28 UTC
checking for predict in -llinear... no

This check should not fail; please attach your config.log.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-08-11 08:19:50 UTC
Created attachment 586534 [details]
config.log

(In reply to Jeroen Roovers from comment #2)
> checking for predict in -llinear... no
> 
> This check should not fail; please attach your config.log.

I suppose this is what you're looking for:

configure:7227: checking for predict in -llinear
configure:7252: x86_64-pc-linux-gnu-gcc-8.3.0 -o conftest -march=x86-64 -mtune=k8 -mcx16 -msahf -msse3 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -Wall -I$(top_srcdir)/liblua -I$(top_srcdir)/libdnet-stripped/include  -Wl,-E -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 conftest.c -llinear -lm -ldl  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/liblinear.so: undefined reference to `dnrm2_'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/liblinear.so: undefined reference to `dscal_'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/liblinear.so: undefined reference to `daxpy_'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/liblinear.so: undefined reference to `ddot_'
collect2: error: ld returned 1 exit status
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2019-08-11 08:20:43 UTC
configure:7258: checking for predict in -llinear
configure:7283: x86_64-pc-linux-gnu-gcc -o conftest -frecord-gcc-switches -g -pipe -O2 -Wall -march=amdfam10 -mtune=amdfam10 -Wno-comment -Wall -I/usr/include
-I$(top_srcdir)/libdnet-stripped/include  -L/usr/lib -Wl,-E -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c -llinear -lm -llua5.3 -ldl  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/liblinear.so: undefined reference to `dnrm2_'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/liblinear.so: undefined reference to `dscal_'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/liblinear.so: undefined reference to `daxpy_'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/liblinear.so: undefined reference to `ddot_'
collect2: error: ld returned 1 exit status
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-08-11 08:27:59 UTC
FWICS liblinear passes -lblas to programs built but not to the shared library.
Comment 6 Larry the Git Cow gentoo-dev 2019-08-11 10:06:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b07f8b0b5a03243325bcb38264c21319daac11e0

commit b07f8b0b5a03243325bcb38264c21319daac11e0
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2019-08-11 09:53:41 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2019-08-11 10:06:09 +0000

    dev-libs/liblinear: Revert "Add IUSE=blas."
    
    In commit 22acd3654a599abcfe5457c157b6e2937a0242ec ("Add IUSE=blas.") I
    tried to add support for linking against a BLAS implementation as
    suggested in liblinear's documentation.
    
    As so far liblinear does not support any helpers for linking against it
    as well as a BLAS library in an automated way, enabling USE=blas can
    result in linking failures in packages that are unaware of the BLAS
    linkage. Until a pkg-config file or other reliable source for library
    linkage is provided with liblinear, usage of an external BLAS library
    cannot be supported.
    
    Package-Manager: Portage-2.3.71, Repoman-2.3.17
    Fixes: https://bugs.gentoo.org/691926
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 dev-libs/liblinear/liblinear-210-r1.ebuild | 15 +--------------
 dev-libs/liblinear/liblinear-221.ebuild    | 15 +--------------
 dev-libs/liblinear/liblinear-230.ebuild    | 13 -------------
 3 files changed, 2 insertions(+), 41 deletions(-)
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-08-11 10:30:07 UTC
This isn't correct.  Since liblinear is a shared library, it is sufficient to pass -lblas when creating it.  No pkg-config or other voodoo is necessary.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2019-08-11 11:29:36 UTC
(In reply to Michał Górny from comment #7)
> This isn't correct.  Since liblinear is a shared library, it is sufficient
> to pass -lblas when creating it.  No pkg-config or other voodoo is necessary.

In the interest of intelligent discourse, please refrain from underscoring your own unresearched claims as canonical. If you can do the counter-research to come up with a solution that does not involve making all liblinear consumers aware of its libblas linkage, then you are entirely free to make such suggestions without invoking QA magic.

As for reopening the bug report: it's unclear how the matter isn't already resolved and fixed to me, so again, in the interest of discourse, I would like you to refrain from changing the status until such a discussion has resulted in consensus among the maintainers and users of both liblinear and nmap.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-08-11 13:07:10 UTC
If instead of solving the problem, you are introducing (or reintroducing) QA violations (bundling libraries is one), then it is a QA matter.  Of course, we could play the game of opening another QA bug for it but we could also stop wasting others' time and just solve it on the same bug whose 'solution' introduced the issue.

I'm sorry for daring to question your solution without performing hours of research fix.  I've done the research now, and surprisingly came with the same solution.  I'm sure this is just a coincidence, and not the fact that the problem is trivial and the solution is obvious.

In any case, here's the brilliant solution I came up with.  Feel free to take the credit, I don't mind.

diff --git a/Makefile b/Makefile
index 0534f2b..52d3d04 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ lib: linear.o tron.o blas/blas.a
 	else \
 		SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.$(SHVER)"; \
 	fi; \
-	$(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER)
+	$(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER) $(LIBS)
 
 train: tron.o linear.o train.c blas/blas.a
 	$(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS)
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2019-08-14 05:07:14 UTC
(In reply to Michał Górny from comment #9)
> If instead of solving the problem, you are introducing (or reintroducing) QA
> violations (bundling libraries is one), then it is a QA matter.

I guess you don't agree with bug #561874 then?
Comment 11 Daniel M. Weeks 2020-06-07 15:22:01 UTC
I'm pretty sure, regardless of whether externally linked blas is the right fix or not, that dropping the USE flag and changing the linkage without a revbump was the wrong thing to do. I have been unable to update nmap on one system and finally revisited the issue - it had a "broken" dev-libs/liblinear-210-r1[blas] leftover on it but nothing called for its rebuild.
Comment 12 Maciej S. Szmigiero 2021-02-15 15:30:43 UTC
(In reply to Daniel M. Weeks from comment #11)
> I'm pretty sure, regardless of whether externally linked blas is the right
> fix or not, that dropping the USE flag and changing the linkage without a
> revbump was the wrong thing to do. I have been unable to update nmap on one
> system and finally revisited the issue - it had a "broken"
> dev-libs/liblinear-210-r1[blas] leftover on it but nothing called for its
> rebuild.

Also got bitten by this.

Please make net-analyzer/nmap depend on dev-libs/liblinear versions that it can actually successfully build against (that is, the fixed ones).
Comment 13 Andreas K. Hüttel archtester gentoo-dev 2022-03-04 23:18:47 UTC
There is no such useflag anymore, so let's assume this is fixed.