Closed Alessandro-Barbieri closed 7 years ago
Hum... version of gcc and useflags for tachyon please.
gcc version 5.4.0 (Gentoo Hardened 5.4.0-r3 p1.3, pie-0.6.5)
emerge -pqv '=media-gfx/tachyon-0.98.9-r2::sage-on-gentoo'
[ebuild N ] media-gfx/tachyon-0.98.9-r2 USE="examples jpeg opengl png threads -doc -mpi"
Ha! Our friend Hardened
. That may require some digging.
Out of curiousity, can you tell me if 0.99_beta6-r1 from the main tree installs? We cannot use it for sage because of some incompatibilities (I tried before) but if it compiles and install we may get some clues. If it doesn't we can also fill a bug for the main tree version where someone may figure it out.
Also very strange list of flags. It looks like your LDFLAGS have been merged with your CFLAGS too, which is not very useful but makes the log very messy. Finally how come your compiler is gcc
and not x86_64-pc-linux-gnu-gcc
?
I am sorry, it was -fopenmp
. I wrote a patch but I cant apply (through /etc/portage/patches
) without modifying the ebuild too.
Right I should have the proper stuff to accept your patch at least. But to be clear, are you meaning that -fopenmp
should be filtered from the {C,LD}FLAGS
?
I patched the faulty c code
--- src/trace.c 2010-01-18 07:13:18.000000000 +0100
+++ /tmp/trace.c 2017-05-10 04:46:20.536523010 +0200
@@ -62,7 +62,7 @@
#if !defined(DISABLEMBOX)
/* allocate mailbox array per thread... */
#if defined(_OPENMP)
- local_mbox = (unsigned long *)calloc(sizeof(unsigned long)*scene->numobjects, 1);
+ local_mbox = (unsigned long *)calloc(sizeof(unsigned long)*scene->objgroup.numobjects, 1);
#else
if (t->local_mbox == NULL)
local_mbox = (unsigned long *)calloc(sizeof(unsigned long)*scene->objgroup.numobjects, 1);
Since S
is in work/tachyon/unix/
the automatic patching won't work because I need to patch work/tachyon/src/trace.c
and relative paths with ../
(../src/trace.c
) are forbidden by patch
Patching with the /etc/portage/patches
needs patches relative to S
Well, I migrated to EAPI 6 so eapply_user
should work. As far as I understand the patch should work like other patches in the eapply format. The previous ebuild didn't have the stuff in src_prepare to allow you to bring your own patches.
Should the ebuild have an openmp useflag?
If you can move https://github.com/cschwan/sage-on-gentoo/blob/master/media-gfx/tachyon/tachyon-0.98.9-r2.ebuild#L28 to S="${WORKDIR}/${PN}
all problems will be solved
About the useflag, I don't know, in the makefile it cites openmp for a particular architecture but did not specify a flag for it. Openmp seems always forgotten, this is the third package with unused openmp code that I encounter (the others being mesa and zpaq)
Hum, I think you are wrong about the patching but I will conduct a test to double check.
For openmp, I think you shouldn't just have -fopenmp
in your default cflags. Yes there may be openmp path in some code and as an end user you may not easily know if they are actively maintained or abandoned cruft. But if openmp can be supported in tachyon I can do something about it to do it properly. Otherwise I may just filter the compiler flag to avoid the problem altogether.
I may move everything to the main tree tachyon ebuild soon. When that happens it will probably make this issue obsolete.
tachyon gone from the overlay. New bugs should go to bugzilla.
Just got this error