mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-04-25 14:16:10 +03:00
[GH-ISSUE #2054] [Linux SDL & Qt Build]Missing LDFLAG -ldl #703
Labels
No labels
Atrac3+
Audio
CPU emulation
D3D11
D3D9 (removed)
Depth / Z
Feature Request
Font Atlas
GE emulation
Guardband / Range Culling
HLE/Kernel
I/O
Input/Controller
MP3
Multithreading
Needs hardware testing
Networking/adhoc/infrastructure
No Feedback / Outdated?
OpenGL
PGF / sceFont
PSMF / MPEG
Platform-specific (Android)
Platform-specific (Windows)
Platform-specific (iOS)
PowerVR GPU
SDL2
Saving issue
User Interface
Vulkan
arm64jit
armjit
armv6
x86jit
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ppsspp#703
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dogtopus on GitHub (Jun 3, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/2054
Need to add it manually to the end of link.txt (Makefile.PPSSPP for Qt build), otherwise:
Linking CXX executable PPSSPPSDL
/usr/bin/ld: lib/libCore.a(atrac3plus.cpp.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/libdl.so so try adding it to the linker command line
/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/libdl.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [PPSSPPSDL] Error 1
make[1]: *** [CMakeFiles/PPSSPPSDL.dir/all] Error 2
make: *** [all] Error 2
My OS: Ubuntu 13.04
@unknownbrackets commented on GitHub (Jun 3, 2013):
http://forums.ppsspp.org/showthread.php?tid=3723
@xsacha, little help?
-[Unknown]
@xsacha commented on GitHub (Jun 4, 2013):
libdl is already linked with:
Qt 4.8.3
gcc 4.7.2
Ubuntu 12.10 64-bit
Will investigate further.
@dogtopus commented on GitHub (Jun 4, 2013):
@xsacha
Qt 4.8.4
gcc 4.7.3
Ubuntu 13.04 32-bit here
Oh btw I got same error while building (linking) other programs e.g. MAME
@jtliaw commented on GitHub (Jun 4, 2013):
Try update QT creator to 2.5.2, cmake to 2.8.8
My gcc is 4.6.3 can build!
Qt creator use debug build!
@xsacha commented on GitHub (Jun 4, 2013):
QtCreator version shouldn't be important. It is just a frontend.
Qt version may be important.
@jtliaw commented on GitHub (Jun 4, 2013):
O!!! My ubuntu 12.04 qt4 is 4.8.1 , but can not build , so i have install qt5 !
But the qt5 creator is 2.7.0 also can't build , so i go to software center revert qtcretor to 2.5.2.
@jtliaw commented on GitHub (Jun 4, 2013):
xsacha! May i ask you why the ppssppqt sound not smoothly?
@xsacha commented on GitHub (Jun 4, 2013):
Yeah, it's using a method I thought makes sense. But it seems I'll have to adopt the no-sense one that blackberry/iOS use for better audio :P From: jtliawSent: Tuesday, 4 June 2013 11:59 PMTo: hrydgard/ppssppReply To: hrydgard/ppssppCc: xsachaSubject: Re: [ppsspp] [Linux SDL & Qt Build]Missing LDFLAG -ldl (#2054)xsacha! May i ask you why the ppssppqt sound not smoothly?
—Reply to this email directly or view it on GitHub.
@chaserhkj commented on GitHub (Jun 5, 2013):
Confirmed this issue on ArchLinux x86_64
I was just building a SDL version of the application using cmake and this message rasied up....
Here's the output of "LANG=C VERBOSE=1 make " on my box: http://pastebin.com/YHhKQ8Vj
My versions:
Arch: x86_64
Linux: 3.9.4-ARCH
Distro: ArchLinux
SDL: 1.2.15
Qt4: 4.8.4
Qt5: 5.0.2
GLibC: 2.17
GCC: 4.8.1
I think this should be considered a bug in our CMakeLists.txt file, as we used dlopen function in the program yet didn't explicitly inform the compiler to link the target to the library file that contains it.
According to my understanding of how gcc works, here when library A is dynamically linked to library B, and while we are linking target C dynamically to A, the compiler will only resolve all the references that are explicitly DEFINED in A, and will NOT resolve references defined in B. Though any calls to functions defined in B from library A still works, called from C to B would cause a link time error. So all we need to do may be adding -dl library linking flag explicitly to CMakeLists.txt to fix this, right?
I'm still pretty new to programming and am not very familiar with how compiler works, so PLEASE comment on my understanding of compiling and linking if there is anything wrong about it.
@chaserhkj commented on GitHub (Jun 7, 2013):
Inspected the code and found out the problem...
Sent a pull request to fix this... On issue #2124 , please check