Review request (XS): 7110396: Sound code fails to build on multiarch Linux systems
Alex Menkov
alexey.menkov at oracle.com
Thu Nov 10 10:25:49 UTC 2011
Looks good
regards
Alex
On 10.11.2011 09:24, mark.reinhold at oracle.com wrote:
> Some Linux distros have started to adopt a "multiarch" filesystem layout for
> shared libraries in order to support the installation of packages for multiple
> hardware architectures on a single system. For more information see, e.g.,
> http://wiki.debian.org/Multiarch.
>
> In Ubuntu 11.10 the ALSA shared library, libasound2, was converted to the
> multiarch format and so its files moved from their old location, /usr/lib,
> to /usr/lib/${ARCH_TRIPLET}. This caused the JDK build to fail when linking
> the Java sound library. The root cause appears to be that gcc only tries to
> resolve undefined symbols against a multiarch library if the library is named
> on the command line after the object files containing those symbols.
>
> The fix is simply to move -lasound to the end of the gcc invocation.
>
> I'll push this into JDK 8. It would trivially backport to 7.
>
> Patch:
>
> --- a/make/javax/sound/jsoundalsa/Makefile
> +++ b/make/javax/sound/jsoundalsa/Makefile
> @@ -65,7 +65,7 @@
> $(MIDIFILES_export) \
> $(PORTFILES_export)
>
> -LDFLAGS += -lasound
> +EXTRA_LIBS += -lasound
>
> CPPFLAGS += \
> -DUSE_DAUDIO=TRUE \
>
> Thanks,
> - Mark
More information about the build-dev
mailing list