Bug 54431 - [build errors] (.text+0x324): undefined reference to `dlopen'
Summary: [build errors] (.text+0x324): undefined reference to `dlopen'
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other Linux (All)
: low normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-03 11:03 UTC by Fabio Pedretti
Modified: 2014-09-22 18:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Fabio Pedretti 2012-09-03 11:03:33 UTC
When trying to configure mesa with:
cd /build/buildd/mesa-9.1~git1209031029.a96119~gd~p/build/osmesa && \
	../../configure --prefix=/usr --mandir=\${prefix}/share/man \
	             --infodir=\${prefix}/share/info --sysconfdir=/etc \
	             --libdir=\${prefix}/lib/i386-linux-gnu \
	             --localstatedir=/var --build=i686-linux-gnu --disable-egl --enable-osmesa --disable-dri CFLAGS="-Wall -g -O2" CXXFLAGS="-Wall -g -O2"

I get errors like the following:
(.text+0x324): undefined reference to `dlopen'
/usr/lib/llvm-3.1/lib/libLLVMSupport.a(DynamicLibrary.o): In function `llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
(.text+0x3f0): undefined reference to `dlclose'
/usr/lib/llvm-3.1/lib/libLLVMSupport.a(DynamicLibrary.o): In function `llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':

Full log here:
https://launchpadlibrarian.net/114643665/buildlog_ubuntu-precise-i386.mesa_9.1~git1209031029.a96119~gd~p_FAILEDTOBUILD.txt.gz

The errors go away if I also add --with-gallium-drivers= but I supposes it should not be needed since I already specified --disable-dri.
Comment 1 Matt Turner 2012-09-03 20:35:15 UTC
> The errors go away if I also add --with-gallium-drivers= but I supposes it
should not be needed since I already specified --disable-dri.

No, the Gallium drivers can be built without DRI. Consider cases like OpenVG or another state tracker.

It looks like you're trying to do an OSMesa build? In that case, Gallium does nothing for you, so disable it.

I think this should be RESOLVED/INVALID.
Comment 2 Fabio Pedretti 2012-09-06 20:03:55 UTC
(In reply to comment #1)
> > The errors go away if I also add --with-gallium-drivers= but I supposes it
> should not be needed since I already specified --disable-dri.
> 
> No, the Gallium drivers can be built without DRI. Consider cases like OpenVG or
> another state tracker.
> 
> It looks like you're trying to do an OSMesa build? In that case, Gallium does
> nothing for you, so disable it.
> 
> I think this should be RESOLVED/INVALID.

This can be OK, but, even better, OSMesa + Gallium should be forbidden by configure rather than later fails to compile.
Comment 3 Emil Velikov 2014-09-22 18:24:29 UTC
The osmesa/gallium-osmesa switches have been made mutually exclusive with

commit c8111904304a878a3d5831b453255f04e1ddcf56
Author: Jon Severinsson <jon@severinsson.net>
Date:   Fri Aug 23 11:18:59 2013 +0200

    gallium/osmesa: Make and install an osmesa.pc.

    As of "2f142d59 build: Add --enable-gallium-osmesa flag." the pkgconfig
    file from classic osmesa is no longer installed when building gallium
    osmesa, so copy it to gallium osmesa and install the copy instead.

    CC: "9.2" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Matt Turner <mattst88@gmail.com>


Whereas for the undefined reference to dlopen, I'm pretty sure that one is resolved as well. Feel free to reopen if the issue is still present.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.