-
Bug
-
Resolution: Fixed
-
P3
-
7
-
None
-
b23
-
generic, x86
-
generic, linux_ubuntu
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2221933 | 7u6 | Edvard Wendelin | P4 | Closed | Fixed | b03 |
The JDK 8 build fails on Ubuntu 11.10 with gcc 4.6 when linking the
Java sound native library against libasound2, the ALSA shared library.
It appears that in this instance gcc only tries to resolve undefined
symbols against a library if the library is named on the command line
after the object files containing those symbols. This behavior is in
accordance with the GNU ld specification [1]. On earlier versions of
Ubuntu, however, this link step worked even though the asound library
was named on the gcc command line ahead of the object files that refer
to it.
The fix is simply to move -lasound to the end of the gcc invocation.
This may or may not be related to the conversion of libasound2 to the
multiarch format in Ubuntu 11.10 [2].
[1] http://stackoverflow.com/questions/45135/linker-order-gcc/409402#409402
[2] http://wiki.debian.org/Multiarch
Java sound native library against libasound2, the ALSA shared library.
It appears that in this instance gcc only tries to resolve undefined
symbols against a library if the library is named on the command line
after the object files containing those symbols. This behavior is in
accordance with the GNU ld specification [1]. On earlier versions of
Ubuntu, however, this link step worked even though the asound library
was named on the gcc command line ahead of the object files that refer
to it.
The fix is simply to move -lasound to the end of the gcc invocation.
This may or may not be related to the conversion of libasound2 to the
multiarch format in Ubuntu 11.10 [2].
[1] http://stackoverflow.com/questions/45135/linker-order-gcc/409402#409402
[2] http://wiki.debian.org/Multiarch
- backported by
-
JDK-2221933 Sound code fails to build with gcc 4.6 on multiarch Linux systems
-
- Closed
-
- duplicates
-
JDK-7116169 OpenJDK sound libraries don't build on Ubuntu 11.10
-
- Closed
-