Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715610 - sci-libs/cholmod-3.0.13: emake failed: nvcc fatal: Unknown option '-fPIC'
Summary: sci-libs/cholmod-3.0.13: emake failed: nvcc fatal: Unknown option '-fPIC'
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 6 votes (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-03-31 12:20 UTC by Constantin Runge
Modified: 2022-04-08 23:38 UTC (History)
15 users (show)

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


Attachments
build.log (file_715610.txt,50.75 KB, text/plain)
2020-03-31 12:20 UTC, Constantin Runge
Details
emerge --info (file_715610.txt,8.04 KB, text/plain)
2020-04-01 15:29 UTC, Constantin Runge
Details
libtool file from 3.0.14 (libtool.gz,87.57 KB, application/gzip)
2020-10-05 09:58 UTC, Miroslav Šulc
Details
cholmod_gpu.h (cholmod_gpu.h,2.37 KB, text/x-chdr)
2021-04-19 14:39 UTC, Peter Gustafson
Details
cholmod-3.0.14-fix-CUDA.patch (cholmod-3.0.14-fix-CUDA.patch,3.40 KB, patch)
2021-11-08 23:50 UTC, Fat-Zer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Constantin Runge 2020-03-31 12:20:59 UTC
Created attachment 627938 [details]
build.log

Building the GPU target for cholmod fails with the message `nvcc fatal: Unknown option '-fPIC''.

AFAIK, nvcc wants the '-fPIC' option with either '--compiler-options' or '-Xcompiler' prepended.
Comment 1 Jonas Stein gentoo-dev 2020-04-01 00:14:43 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. That is why I ask you to 
* attach the logs and 
* paste the emerge info 
as described on 
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Comment 2 Constantin Runge 2020-04-01 15:29:13 UTC
Created attachment 628474 [details]
emerge --info

Added output of `emerge --info` as well. I've already attached the build.log when creating the ticket. Please tell, if something went wrong there.
Comment 3 Constantin Runge 2020-04-16 13:24:40 UTC
It looks like this is a libtool problem. In theory, the build system should prepend the `lt_prog_compiler_pic` with `-Xcompiler` for the nvcc compiler. But I'm not really sure, why this rule is not applied.
Comment 4 François Bissey 2020-10-05 09:13:00 UTC
Could generate a new log (3.0.13 or 3.0.14) at -j1. Just to make things clearer. I think you have identified the most likely cause of trouble in any case.
Comment 5 François Bissey 2020-10-05 09:44:01 UTC
(In reply to François Bissey from comment #4)
> Could generate a new log (3.0.13 or 3.0.14) at -j1. Just to make things
> clearer. I think you have identified the most likely cause of trouble in any
> case.

No need for that now that I have looked more closely. Trying to identify what is going wrong in libtool.
Comment 6 François Bissey 2020-10-05 09:50:27 UTC
Can you attach the generated libtool file?
Comment 7 Miroslav Šulc gentoo-dev 2020-10-05 09:58:20 UTC
Created attachment 663847 [details]
libtool file from 3.0.14
Comment 8 François Bissey 2020-10-05 18:47:30 UTC
Thanks. That libtool doesn't contain any bits for nvcc, which explains why things fail. Either there is something to fix in configure.ac/Makefile.am to get the bits included or I use an alternative approach.
Comment 9 François Bissey 2020-10-05 21:43:27 UTC
I have ideas to test. I can put some ebuild in the sage-on-gentoo overlay or attach some files here for you to try. Which works better for you?
Comment 10 Miroslav Šulc gentoo-dev 2020-10-06 03:51:20 UTC
(In reply to François Bissey from comment #9)
> I have ideas to test. I can put some ebuild in the sage-on-gentoo overlay or
> attach some files here for you to try. Which works better for you?

you can attach it here, thank you :-)
Comment 11 François Bissey 2020-10-22 09:16:17 UTC
Sorry for the silence I am completely overloaded left and right.
Comment 12 Peter Gustafson 2021-04-19 14:39:50 UTC
Created attachment 700836 [details]
cholmod_gpu.h

Bump.  I've tried and failed to debug this.

Note also that the current tar.bz2 file for 3.0.14 doesn't include the headers for GPU.

cholmod-3.0.14/Include/cholmod_gpu.h

I'm attaching it here.

I also tried sage-on-gentoo overlay (3.0.13-r3) and no luck.
Comment 13 François Bissey 2021-04-19 20:42:35 UTC
(In reply to Peter Gustafson from comment #12)
> Created attachment 700836 [details]
> cholmod_gpu.h
> 
> Bump.  I've tried and failed to debug this.
> 
> Note also that the current tar.bz2 file for 3.0.14 doesn't include the
> headers for GPU.
> 
> cholmod-3.0.14/Include/cholmod_gpu.h
> 
> I'm attaching it here.
> 
> I also tried sage-on-gentoo overlay (3.0.13-r3) and no luck.

Yes, I am sorry. I am completely overwhelmed with various things and that one has taken the back seat. I know precisely why this is failing. Fixing it is another story, I have some leads from a few other packages though.

But at the end of the day, it looks like doing C+nvcc is easier with cmake than autoconf.
Comment 14 Reza Fard 2021-08-31 09:50:30 UTC
Any news or further actions or possible fixes/workarounds on this issue?
Comment 15 Fat-Zer 2021-11-08 08:15:16 UTC
Note that this failure is caused by USE="cuda". It builds fine without it.
Comment 16 Fat-Zer 2021-11-08 23:50:35 UTC
Created attachment 749631 [details, diff]
cholmod-3.0.14-fix-CUDA.patch

A proposed patch: it's a bit hacky, but it should do the trick.

Also I'd suggest to inherit cuda.eclass to avoid problems with some other cuda-related stuff.
Comment 17 Peter Gustafson 2021-12-03 02:35:15 UTC
Worked for me!
Comment 18 hReZ@ 2022-01-23 16:25:30 UTC
(In reply to Fat-Zer from comment #16)
> Created attachment 749631 [details, diff] [details, diff]
> cholmod-3.0.14-fix-CUDA.patch
> 
> A proposed patch: it's a bit hacky, but it should do the trick.
> 
> Also I'd suggest to inherit cuda.eclass to avoid problems with some other
> cuda-related stuff.

Works for me! thx for your patch!
Comment 19 Pacho Ramos gentoo-dev 2022-01-23 18:18:06 UTC
This should probably be upstreamed:
https://github.com/DrTimothyAldenDavis/SuiteSparse/issues

I see they have plenty of cuda bugs and commits in their repo and, then, this is likely to break again soon 

I also wonder if maybe we should move everything to a sci-libs/suitesparse ebuild to follow more easily upstream bumps and use their tarballs :/
Comment 20 François Bissey 2022-01-23 18:41:13 UTC
(In reply to Pacho Ramos from comment #19)
> This should probably be upstreamed:
> https://github.com/DrTimothyAldenDavis/SuiteSparse/issues
> 
> I see they have plenty of cuda bugs and commits in their repo and, then,
> this is likely to break again soon 
> 
> I also wonder if maybe we should move everything to a sci-libs/suitesparse
> ebuild to follow more easily upstream bumps and use their tarballs :/

That would make some things easier and some things more complicated. There wouldn't really be a configuration phase. Who wants to deal with a superbuild which is directed by a big Makefile? I did some very hackish monolithic build in sagemath and that's not pretty.

That being said, getting more stuff upstream would be a great thing.
Comment 21 Fat-Zer 2022-01-25 11:56:09 UTC
(In reply to Pacho Ramos from comment #19)
> This should probably be upstreamed:
> https://github.com/DrTimothyAldenDavis/SuiteSparse/issues
> 

That's a build-system-related issue, they don't use autotools upstream. It looks like a purely gentoo thing, so IMHO there is no reason to bother upstream with that.

I suppose, the patch should be applied to what-ever repository where gentoo tarballs are maintained, but I got no idea where it is.
Comment 22 Oleg Korsak 2022-04-08 23:38:56 UTC
same issue with sci-libs/cholmod-3.0.14