Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 835021

Summary: sci-libs/flann-1.9.1-r5[octave] cannot find -loctinterp
Product: Gentoo Linux Reporter: Alessandro Barbieri <lssndrbarbieri>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: CONFIRMED ---    
Severity: normal CC: fatzer2, jouni.kosonen, jstein, kripton
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=836945
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 858554    
Bug Blocks:    
Attachments: emerge_info
flann-1.9.1-r5:20220313-014441.log
find and use OCTLIBDIR in the custom command

Description Alessandro Barbieri 2022-03-13 02:43:01 UTC
This package fails to build on an unstable system. Attached relevant logs and emerge --info
Comment 1 Alessandro Barbieri 2022-03-13 02:43:06 UTC
Created attachment 766896 [details]
emerge_info

emerge --info
Comment 2 Alessandro Barbieri 2022-03-13 02:43:08 UTC
Created attachment 766897 [details]
flann-1.9.1-r5:20220313-014441.log

build log
Comment 3 Alessandro Barbieri 2022-05-05 02:42:48 UTC
octave install this file /etc/env.d/99octave containing
LDPATH=/usr/lib64/octave/6.4.0

for some reasons it doesn't work while linking
Comment 4 Alessandro Barbieri 2022-05-06 23:31:16 UTC
In the octaveforge eclass https://github.com/gentoo/guru/blob/f67e192b6b303d35e13f36ae9ffd9739ca69c495/eclass/octaveforge.eclass#L87 I've solved the issue with:

octavecommand() {
	"${OCT_BIN}" -H -q --no-site-file --eval "$1"
}

cmd="disp(__octave_config_info__('octlibdir'));"
OCTLIBDIR=$(octavecommand "${cmd}" || die)
export LFLAGS="-L${OCTLIBDIR}"

this will work until octave-7 when they will deprecate LFLAGS in favour of LDFLAGS
then an export LDFLAGS="${LDFLAGS} -L${OCTLIBDIR}" will mostly like work
Comment 5 Alessandro Barbieri 2022-05-06 23:32:41 UTC
LFLAGS are already deprecated, in version 7 they will remove the ability to use them
Comment 6 Jouni Kosonen 2022-07-07 18:45:02 UTC
Created attachment 790553 [details, diff]
find and use OCTLIBDIR in the custom command

The patch alters the changes and additions from flann-1.9.1-build-oct-rather-than-mex-files-for-octave.patch – it would probably be wiser to modify that directly instead but this worked as a user patch.
Comment 7 Fat-Zer 2022-07-17 08:36:43 UTC
IMHO this one as well as an #836945 is more of an sci-mathematics/octave-6.4.0-r3 bug rather than a flann or hdf5 bugs respectively because /usr/bin/mkoctfile is supposed to build an octave module without any additional hassle...