You are not logged in.
Hello everyone,
According to a comment from:
https://aur.archlinux.org/packages.php?ID=9458
I'm supposed to make sure libx11 and/or its symbols are installed correctly because the problem is not with PKGBUILD.
I tried reinstalling libx11 and its dependencies with pacman -S.
However, that didn't work, so how do I fix the undefined references error?
See:
Modified PKGBUILD (Only URL and Source are modified: )
Yaourt Install Output:
Notes:
-You'll see that I'm using yaourt to install mozplugger. I also tried compiling mozplugger myself; however, when I typed the command "make", a similar "undefined reference" error occurred.
Last edited by Cylinder57 (2012-07-25 05:36:31)
Offline
I believe fs4000's comment was only half right. The problem is not with the PKGBUILD, but with the upstream source. Specifically there is a problem in the input to the configure script which results in -lX11 not being added to the Makefiles.
This sort of problem is generally 'patched' in a PKGBUILD.
I'll see if I can find an easy fix. I'll edit this post in a bit with more info.
edit: I tried the PKGBUILD you posted above. It worked perfectly for me. I even verified that the Makefile includes the -lX11 flag. I was too quick to judge fs4000's comment, it seems to be correct. I suspect the problem is on your end.
Do you have problems compiling anything else from the AUR that requires X11? Can you try building with makepkg instead of yaourt and post any error output?
edit2: Did you see this in your output
==> WARNING: Building package as root is dangerous.
Please run yaourt as a non-privileged user.
. Heed that warning.
Last edited by Trilby (2012-07-23 12:07:47)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It seems to be the configure script that doesn't add -lX11 for you. I don't know how this comes.
Just another try: Do you have the whole base-devel group installed?
Offline
It seems to be the configure script that doesn't add -lX11 for you. I don't know how this comes.
Just another try: Do you have the whole base-devel group installed?
I did have base-devel installed. In fact, I typed "pacman -S base-devel" just to check.
And, I have a similar error after I typed "make." However, ./configure was just fine. (See output below: )
Note that I typed "su" and then ran ./configure and make.
Output after I typed "./configure":
Output after I typed "make":
On another note:
edit2: Did you see this in your output
==> WARNING: Building package as root is dangerous. Please run yaourt as a non-privileged user.
. Heed that warning.
How do I make sure yaourt runs in a safer and more secure way?
Offline
How do I make sure yaourt runs in a safer and more secure way?
Login as a regular user. Don't use sudo.
edit: I see you also ran configure and make as root. This is a bad habit. Running as root will not solve problems, it will just make it more likely that any problems you encounter could be catastrophic. Even without makepkg/pacman, a normal configure and build process would run compile and make as a regular user, using root privileges only for the `make install` step. As you should not even be trying to install until the build is successful, you should be doing EVERYTHING as a regular user until the problem is solved. It is possible to cause such problems by loggin in as root as your environment, settings, and configs are all different.
In short: root privileges do not solve problems, they magnify them.
Last edited by Trilby (2012-07-23 20:26:13)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Even without makepkg/pacman, a normal configure and build process would run compile and make as a regular user, using root privileges only for the `make install` step.
Thanks for the tip, Trilby. This time, I used ./configure and make as a regular user. Same problem occurs.
See:
./configure output:
make output:
Offline
Can you also post the Makefile generate by the configure script.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Here are copies of the makefiles (I typed ./configure first)
Makefile:
Makefile.in:
Do you need makefile.old?
Offline
You could try (in the directory with the Makefile)
sed -i 's/^XLIBS.*/XLIBS=-lX11/'
make
Configure is not adding the lX11 flag as noted above, and you can see in the configure output the line
checking for XDisplayName in -lX11... no
which should be a yes. (Mine has yes).
As a check can you run these two commands and post their output.
pkg-config --libs x11
pacman -Ql libx11 | grep libX11.so
edit: Also,
Do you have problems compiling anything else from the AUR that requires X11?
Last edited by Trilby (2012-07-23 22:06:12)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Edit: All listed output deleted due to use of incorrect commands.
Also, do you have problems compiling anything else from the AUR that requires X11?
I haven't tried something like that yet. I'll try it.
Edit:
I downloaded mozplugger-chromium from the AUR (requires libX11) and this original undefined error still existed:
mozplugger-helper.c:(.text+0x149): undefined reference to `XGetErrorText'
...
mozplugger-helper.c:(.text.startup+0x12a9): undefined reference to `XSync'
mozplugger-helper.c:(.text.startup+0x133c): undefined reference to `XCloseDisplay'
mozplugger-helper.c:(.text.startup+0x145d): undefined reference to `XCloseDisplay'
Last edited by Cylinder57 (2012-07-23 22:45:11)
Offline
Oops, I dropped half the sed command. That should have beeb
sed -i 's/^XLIBS.*/XLIBS=-lX11/' Makefile
make
Sorry. Typing faster than I'm thinking. The sed command is just a quick way of editting the Makefile to add the -X11 switch where it is needed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay, I did:
sed -i 's/^XLIBS.*/XLIBS=-lX11/' Makefile
Before make.
Here's the result.
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o mozplugger.o './mozplugger.c'
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o npunix.o './npapi/common/npunix.c'
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o mozplugger-common.o './mozplugger-common.c'
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o debug.o './debug.c'
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o npn-get-helpers.o './npn-get-helpers.c'
gcc -shared -L/usr/lib -o mozplugger.so mozplugger.o mozplugger-common.o npunix.o debug.o npn-get-helpers.o -lX11
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o mozplugger-helper.o './mozplugger-helper.c'
gcc -c -I. -I. -I./npapi/include -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -fPIC -Wall -O2 -o child.o './child.c'
gcc -L/usr/lib -o mozplugger-helper mozplugger-helper.o mozplugger-common.o child.o debug.o -lX11
/usr/bin/ld: warning: libdl.so.2, needed by /usr/lib/libX11.so, not found (try using -rpath or -rpath-link)
/usr/lib/libX11.so: undefined reference to `dlsym@GLIBC_2.0'
/usr/lib/libX11.so: undefined reference to `dlopen@GLIBC_2.1'
collect2: error: ld returned 1 exit status
make: *** [mozplugger-helper] Error 1
Offline
OK, its slow ... but that's progress.
By any chance did anything go wrong in your glibc update?
One check:
pacman -Ql glibc | grep libdl.so.2
Last edited by Trilby (2012-07-23 22:47:52)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Here's my output from pacman -Ql glibc | grep libdl.so.2:
glibc /lib/libdl.so.2
Offline
There's the problem.
At some point recently you did a partial upgrade.
A pacman -Syu, followed by dealing with any resulting errors, should fix this right up.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Umm... This mozplugger issue actually connects with the glibc issue. Pacman -Syu won't work because glibc cannot be upgraded yet. I have to make sure glibc is upgraded. This is actually more difficult than it seems.
Last edited by Cylinder57 (2012-07-23 23:23:44)
Offline
This mozplugger issue actually connects with the glibc issue.
Yes. Glibc is an extremely important package, especially when you want to compile something. Frankly, if you botched that update and your system is still running, you should count yourself as lucky. Fix it.
Pacman -Syu won't work because glibc cannot be upgraded yet.
Read the news, the wiki, and other forum posts. Then fix it.
Last edited by Trilby (2012-07-23 23:19:57)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ok, I solved the glibc problem and my mozplugger install was successful.
Here is the link I used:
https://wiki.archlinux.org/index.php/De … iki:usrlib
What I did was:
1. I backed up my data (i.e. /etc , /home , /var , pacman database, list of installed packages, and anything else I needed.) because I could break my system.
See for more details on backup:
https://wiki.archlinux.org/index.php/En … _Stability
2. I found which packages were owning files by typing:
find /lib -exec pacman -Qo -- {} +
Many of the files in /lib were unowned by any package. So, I just deleted those unowned files. Of course, the manual work of deletion was rather tedious...
Note that if any file is listed as being owned by any of your packages (besides glibc), please upgrade those packages so that its files are in /usr/lib.
3. After all those files were deleted, (The /lib folder was probably the only thing that was unowned. However, no file was certainly unowned.) I typed: pacman -Su. This is to upgrade glibc.
4. That glibc upgrade was successful. However, I had some text 'errors,' (I don't remember what they were.) so I restarted my computer and those 'errors' were gone.
5. I just installed mozplugger. Now everything's working well again.
Thanks for all your help, anyway, because I initially didn't know an unupgraded glibc caused problems.
P.S. If my solution does not help, here is a reference:
https://bbs.archlinux.org/viewtopic.php?id=145006
You might be going back to the very topic that you were on, which is titled "glibc update refusing to proceed. File ownership problem"
Last edited by Cylinder57 (2012-07-25 05:50:06)
Offline