Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439844 - media-libs/stk-4.4.4 - In file included from RtAudio.cpp:6750:0: include/soundcard.h:106:28: fatal error: machine/endian.h: No such file or directory
Summary: media-libs/stk-4.4.4 - In file included from RtAudio.cpp:6750:0: include/soun...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-27 10:50 UTC by tokiclover
Modified: 2020-02-08 00:07 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,25.57 KB, text/plain)
2012-10-27 10:54 UTC, tokiclover
Details
stk-4.4.4-RtAudio.cpp.patch (stk-4.4.4-RtAudio.cpp.patch,413 bytes, patch)
2012-11-30 04:19 UTC, Patrick McMunn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tokiclover 2012-10-27 10:50:07 UTC
Just tryingg to compile media-sound/lmms +stk and compilation fails when merghing stk.

In file included from RtAudio.cpp:6750:0:
include/soundcard.h:106:28: fatal error: machine/endian.h: No such file or directory
compilation terminated.
make[1]: *** [RtAudio.o] Error 1

I'm googling to found out which dependency should be merged that install that file.

Reproducible: Always

Steps to Reproduce:
1.emerge -1 stk
2.
3.
Actual Results:  
emake failed
Comment 1 tokiclover 2012-10-27 10:54:15 UTC
I cannot upload the build log, every time I try it just fails to do so. Sorry for that.
Comment 2 tokiclover 2012-10-27 10:54:54 UTC
Created attachment 327514 [details]
build.log
Comment 3 tokiclover 2012-10-27 11:35:26 UTC
Probleme located to building against OSS, it build fine with -oss USE flag. 
I'mm using OSS4 and oss-4.2.xxxx does not install anyy endian.h header file. Trying to locate the right header file(s).
Comment 4 tokiclover 2012-10-27 11:45:01 UTC
I tried to found endian.h file to no avail. Although /usr/lib/oss/include/sys/soundcard.h installed by OSS4 contains the variable introduced by <machine/endian.h>. So now, it's not that simple patch to make because I have no idea what oss-3.xx install at all. I could try to patch that file to include the previous (oss) file and add an `-I/usr/lib/oss/include' but this will depend on OSS4 only?
Comment 5 Patrick McMunn 2012-11-30 04:19:17 UTC
Created attachment 331010 [details, diff]
stk-4.4.4-RtAudio.cpp.patch

I have solved the issue. The endian.h needed is provided by glibc - not by oss, so I patched the soundcard.h included with the stk sources to point to <endian.h> instead of <machine/endian.h>.

After that, compilation failed with numerous errors such as "‘PCM_CAP_OUTPUT’ was not declared in this scope". After a little hunting, it turns out that these declarations are only made in the souncard.h which is provided by oss - not by the soundcard.h provided with the stk sources or the one provided by sys-kernel/linux-headers (the one provided by glibc just points to the linux-headers version).

I provide all the above info in case anyone wants to know what the problem and fix was. In any case, I provide a patch for RtAudio.cpp to include the correct soundcard.h. In addition, the media-libs/stk ebuild should be updated to include DEPEND="oss? ( media-sound/oss )" so that the correct header file will be available during stk compilation.
Comment 6 tokiclover 2013-01-23 10:14:26 UTC
Thanks Patrick!

I was a few hints when I openned this bug that the symbols in question was provided by OSS package rather than glibc.

I have a custom oss ebuild on my [bar-]overlay which make lin `/usr/include/oss' to `/usr/lib/oss/include' and add a `/usr/lib/pkgconfig/OSSlib.pc' which right point to the library and compilation FLAGS.

So with your confirmed hints, I only have `<oss/sys/soundcard.h>' instead of a *hard link* to the file in question.

Anyway, oss is broken since kernel 3.2 (?). I cannot make it work with 3.4 anymore and I don't have the time to look for a fix. Or rather, I don't want to spent hours on it.
Comment 7 Patrick McMunn 2013-01-23 16:33:32 UTC
As for OSS4, I was able to compile it with no trouble on my system running a 3.7.1 kernel. Perhaps it may no longer compile on older kernels, but unless you actually need an old kernel version, compilation should succeed. If it doesn't, open up a Gentoo bug. If I misunderstood and you're talking about OSS3 included in the kernel sources not compiling, that sounds like a bug for kernel.org.
Comment 8 Pacho Ramos gentoo-dev 2018-02-20 14:53:27 UTC
can you retry with 4.5.1-r1?