Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561826 - dev-libs/liblinear-210-r1 tron.o: In function `TRON::trcg(double, double*, double*, double*)': tron.cpp:(.text+0x256): undefined reference to `dnrm2_'
Summary: dev-libs/liblinear-210-r1 tron.o: In function `TRON::trcg(double, double*, do...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
: 561828 561830 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-29 13:58 UTC by Ben Kohler
Modified: 2015-09-29 16:14 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2015-09-29 13:58:42 UTC
dev-libs/liblinear-210-r1 seems to be missing -lblas on its link command.  I can see the makefile has commented out:

#LIBS = -lblas

What happened here?


 * Package:    dev-libs/liblinear-210-r1
 * Repository: gentoo
 * Maintainer: jer@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking liblinear-210.tar.gz to /var/tmp/portage/dev-libs/liblinear-210-r1/work
>>> Source unpacked in /var/tmp/portage/dev-libs/liblinear-210-r1/work
>>> Preparing source in /var/tmp/portage/dev-libs/liblinear-210-r1/work/liblinear-210 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-libs/liblinear-210-r1/work/liblinear-210 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-libs/liblinear-210-r1/work/liblinear-210 ...
make -j4 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ 'CFLAGS=-O2 -pipe -march=nati
ve -fPIC' 'CXXFLAGS=-O2 -pipe -march=native -fPIC' 'AR=x86_64-pc-linux-gnu-ar rcv' RANLIB=x86
_64-pc-linux-gnu-ranlib LIBS=-L/usr/lib64/blas/reference -lblas lib all
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fPIC -c -o linear.o linear.cpp
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fPIC -c -o tron.o tron.cpp
if [ "Linux" = "Darwin" ]; then \
        SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.3"; \
else \
        SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.3"; \
fi; \
x86_64-pc-linux-gnu-g++ ${SHARED_LIB_FLAG} -Wl,-O1 -Wl,--as-needed linear.o tron.o  -o liblin
ear.so.3
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fPIC -Wl,-O1 -Wl,--as-needed -o predict pred
ict.c tron.o linear.o -L/usr/lib64/blas/reference
tron.o: In function `TRON::trcg(double, double*, double*, double*)':
tron.cpp:(.text+0x256): undefined reference to `dnrm2_'
tron.cpp:(.text+0x275): undefined reference to `ddot_'
tron.cpp:(.text+0x2e5): undefined reference to `ddot_'
tron.cpp:(.text+0x30f): undefined reference to `daxpy_'
tron.cpp:(.text+0x31f): undefined reference to `dnrm2_'
tron.cpp:(.text+0x358): undefined reference to `daxpy_'
tron.cpp:(.text+0x36c): undefined reference to `ddot_'
tron.cpp:(.text+0x392): undefined reference to `dscal_'
tron.cpp:(.text+0x3ab): undefined reference to `daxpy_'
tron.cpp:(.text+0x3b9): undefined reference to `dnrm2_'
tron.cpp:(.text+0x45b): undefined reference to `daxpy_'
tron.cpp:(.text+0x46f): undefined reference to `ddot_'
tron.cpp:(.text+0x489): undefined reference to `ddot_'
tron.cpp:(.text+0x4a2): undefined reference to `ddot_'
tron.cpp:(.text+0x510): undefined reference to `daxpy_'
tron.cpp:(.text+0x53c): undefined reference to `daxpy_'
tron.o: In function `TRON::tron(double*)':
tron.cpp:(.text+0x6d5): undefined reference to `dnrm2_'
tron.cpp:(.text+0x71e): undefined reference to `dnrm2_'
tron.cpp:(.text+0x7e2): undefined reference to `daxpy_'
tron.cpp:(.text+0x7f8): undefined reference to `ddot_'
tron.cpp:(.text+0x814): undefined reference to `ddot_'
tron.cpp:(.text+0x85c): undefined reference to `dnrm2_'
tron.cpp:(.text+0xac6): undefined reference to `dnrm2_'
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target 'predict' failed
make: *** [predict] Error 1
 * ERROR: dev-libs/liblinear-210-r1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/liblinear-210-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/liblinear-210-r1::gentoo'`.
 * The complete build log is located at '/var/log/portage/dev-libs:liblinear-210-r1:20150929-135319.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-libs/liblinear-210-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/liblinear-210-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/liblinear-210-r1/work/liblinear-210'
 * S: '/var/tmp/portage/dev-libs/liblinear-210-r1/work/liblinear-210'
 * Package:    dev-libs/liblinear-210-r1
 * Repository: gentoo
 * Maintainer: jer@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
Comment 1 Ben Kohler gentoo-dev 2015-09-29 14:55:48 UTC
*** Bug 561828 has been marked as a duplicate of this bug. ***
Comment 2 Ben Kohler gentoo-dev 2015-09-29 14:56:10 UTC
*** Bug 561830 has been marked as a duplicate of this bug. ***
Comment 3 Conrad Kostecki gentoo-dev 2015-09-29 15:00:50 UTC
I can confirm.  Same problem here.
Comment 4 Ben Kohler gentoo-dev 2015-09-29 15:16:03 UTC
Aha I see now, I should have looked closer.  LIBS is supposed to be set in the make command via a pkg-config call in the ebuild, but this isn't working.  It appears to be a quoting problem.

This ebuild change seems to fix it:

--- liblinear-210-r1.ebuild     2015-09-29 10:14:19.581922950 -0500
+++ liblinear-210-r1.ebuild.new 2015-09-29 10:12:15.466842332 -0500
@@ -41,7 +41,7 @@
                CXXFLAGS="${CXXFLAGS} -fPIC" \
                AR="$(tc-getAR) rcv" \
                RANLIB="$(tc-getRANLIB)" \
-               LIBS=$($(tc-getPKG_CONFIG) --libs blas) \
+               LIBS="$($(tc-getPKG_CONFIG) --libs blas)" \
                lib all
 }
Comment 5 Conrad Kostecki gentoo-dev 2015-09-29 15:19:27 UTC
(In reply to Ben Kohler from comment #4)
> Aha I see now, I should have looked closer.  LIBS is supposed to be set in
> the make command via a pkg-config call in the ebuild, but this isn't
> working.  It appears to be a quoting problem.
> 
> This ebuild change seems to fix it:
> 
> --- liblinear-210-r1.ebuild     2015-09-29 10:14:19.581922950 -0500
> +++ liblinear-210-r1.ebuild.new 2015-09-29 10:12:15.466842332 -0500
> @@ -41,7 +41,7 @@
>                 CXXFLAGS="${CXXFLAGS} -fPIC" \
>                 AR="$(tc-getAR) rcv" \
>                 RANLIB="$(tc-getRANLIB)" \
> -               LIBS=$($(tc-getPKG_CONFIG) --libs blas) \
> +               LIBS="$($(tc-getPKG_CONFIG) --libs blas)" \
>                 lib all
>  }

Does work for me :) Thanks!
Comment 6 Thomas Capricelli 2015-09-29 15:44:30 UTC
hit by this, too
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-09-29 16:14:11 UTC
Since this is a pretty obvious fix, I committed it. Hope you don't mind.

commit 997ff7a451b339bc2402340ab600c02c7e0cccc7
Author: Michał Górny <mgorny@gentoo.org>
Date:   Tue Sep 29 18:13:23 2015 +0200

    dev-libs/liblinear: fix missing quoting, #561826
    
    Add missing quoting around make parameters. Thanks to Ben Kohler for the
    solution.
    
    Fixes: https://bugs.gentoo.org/show_bug.cgi?id=561826
    
    Package-Manager: portage-2.2.20