Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Ubuntu 16.04 LTS amd64 #75

Closed
hholst80 opened this issue Jun 2, 2016 · 22 comments
Closed

Build error on Ubuntu 16.04 LTS amd64 #75

hholst80 opened this issue Jun 2, 2016 · 22 comments

Comments

@hholst80
Copy link

hholst80 commented Jun 2, 2016

I'm getting a link error at build on Ubuntu 16.04 LTS. Any ideas?

[ 99%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/vizdoom_game.cpp.o
[ 99%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/vizdoom_screen.cpp.o
[ 99%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/vizdoom_shared_memory.cpp.o
[100%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/vizdoom_message_queue.cpp.o
[100%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/vizdoom_main.cpp.o
[100%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/vizdoom_depth.cpp.o
[100%] Linking CXX executable ../../../bin/vizdoom
CMakeFiles/vizdoom.dir/tempfiles.cpp.o: In function `FTempFileName::FTempFileName(char const*)':
tempfiles.cpp:(.text+0x7): warning: the use of `tempnam' is dangerous, better use `mkstemp'
//lib/x86_64-linux-gnu/libsystemd.so.0: undefined reference to `lzma_stream_decoder@XZ_5.0'
//lib/x86_64-linux-gnu/libsystemd.so.0: undefined reference to `lzma_end@XZ_5.0'
//lib/x86_64-linux-gnu/libsystemd.so.0: undefined reference to `lzma_code@XZ_5.0'
collect2: error: ld returned 1 exit status
src/vizdoom/src/CMakeFiles/vizdoom.dir/build.make:8868: recipe for target 'bin/vizdoom' failed
make[2]: *** [bin/vizdoom] Error 1
CMakeFiles/Makefile2:897: recipe for target 'src/vizdoom/src/CMakeFiles/vizdoom.dir/all' failed
make[1]: *** [src/vizdoom/src/CMakeFiles/vizdoom.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
@hholst80 hholst80 changed the title Build error on Ubuntu 16.04 LTS amd_64 Build error on Ubuntu 16.04 LTS amd64 Jun 2, 2016
@mwydmuch
Copy link
Collaborator

mwydmuch commented Jun 2, 2016

Looks like liblzma is missing or there is same version mismatch.
What is the output of dpkg -l | grep lzma?
Maybe simple apt-get upgrade liblzma-dev liblzma5will solve the problem.

@hholst80
Copy link
Author

hholst80 commented Jun 3, 2016

The apt-get upgrade libzma-dev liblzma5 did not solve the issue.

$ dpkg -l | grep lzma
ii  liblzma-dev:amd64                           5.1.1alpha+20120614-2ubuntu2                        amd64        XZ-format compression library - development files
ii  liblzma5:amd64                              5.1.1alpha+20120614-2ubuntu2                        amd64        XZ-format compression library
ii  lzma-dev                                    9.22-2ubuntu2                                       all          Compression and decompression in the LZMA format - development files

@wjaskowski
Copy link
Collaborator

Does ZDoom alone (http://zdoom.org/wiki/Compile_ZDoom_on_Linux) compile
correctly on your system?

Wojciech Jaśkowski, Ph.D.
Laboratory of Intelligent Decision Support Systems
Institute of Computing Science
Poznan University of Technology, Poland
http://www.cs.put.poznan.pl/wjaskowski

On 3 June 2016 at 09:43, Henrik Holst notifications@github.com wrote:

The apt-get upgrade libzma-dev liblzma5 did not solve the issue.

$ dpkg -l | grep lzma
ii liblzma-dev:amd64 5.1.1alpha+20120614-2ubuntu2 amd64 XZ-format compression library - development files
ii liblzma5:amd64 5.1.1alpha+20120614-2ubuntu2 amd64 XZ-format compression library
ii lzma-dev 9.22-2ubuntu2 all Compression and decompression in the LZMA format - development files


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#75 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEuSHQK8JgNOxAp6cD2zV75WJlhKNZTTks5qH9spgaJpZM4IshCe
.

@hholst80
Copy link
Author

hholst80 commented Jun 7, 2016

Yes it seems to build just fine,

$ ./zdoom 
ZDoom 2.9pre-1002-g1703842 - 2016-06-06 10:48:40 +0200 - SDL version
Compiled on Jun  7 2016

M_LoadDefaults: Load system defaults.
Cannot find a game IWAD (doom.wad, doom2.wad, heretic.wad, etc.).
Did you install ZDoom properly? You can do either of the following:

1. Place one or more of these wads in ~/.config/zdoom/.
2. Edit your ~/.config/zdoom/zdoom.ini and add the directories of your
iwads to the list beneath [IWADSearch.Directories]

@wjaskowski
Copy link
Collaborator

So maybe execute ldconfig -p | grep lzma and check that the files linked there exist.

@domluna
Copy link

domluna commented Jun 7, 2016

@wjaskowski I'm having the same issue, on 16.04 as well.

ldconfig -p | grep lzma                                     
    liblzma.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/liblzma.so.5
    liblzma.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/liblzma.so
ls /lib/x86_64-linux-gnu/ | grep lzma
liblzma.so.5
liblzma.so.5.0.0

So from the looks of it liblzma.so isn't actually there.

@wjaskowski
Copy link
Collaborator

Do the so files exist?
On Jun 7, 2016 17:53, "Dominique Luna" notifications@github.com wrote:

@wjaskowski https://github.com/wjaskowski I'm having the same issue, on
16.04 as well.

ldconfig -p | grep lzma
liblzma.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/liblzma.so.5
liblzma.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/liblzma.so


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#75 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEuSHWnE-ctX1Xlmu_lr06u0Mct3Jjgyks5qJZPmgaJpZM4IshCe
.

@domluna
Copy link

domluna commented Jun 7, 2016

I misread the filepath didn't see the /usr/ prefix for liblzma.so but it's also there.

ls /usr/lib/x86_64-linux-gnu/ | grep lzma
liblzma.a
liblzma.so

@wjaskowski
Copy link
Collaborator

But it might be a link pointing at nothing:

liblzma.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/liblzma.so.5
➜  ~ ls -l /lib/x86_64-linux-gnu/liblzma.so.5
➜  ~ ls -l /lib/x86_64-linux-gnu/liblzma.so.5
lrwxrwxrwx 1 root root 16 lis 21  2014 /lib/x86_64-linux-gnu/liblzma.so.5
-> liblzma.so.5.0.0
➜  ~ ls -l /lib/x86_64-linux-gnu/liblzma.so.5.0.0
-rw-r--r-- 1 root root 137400 lut 12  2014
/lib/x86_64-linux-gnu/liblzma.so.5.0.0

On 7 June 2016 at 19:28, Dominique Luna notifications@github.com wrote:

I misread the filepath didn't see the /usr/ prefix for liblzma.so but it's
also there.

ls /usr/lib/x86_64-linux-gnu/ | grep lzma
liblzma.a
liblzma.so


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#75 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEuSHUae1MBdunOTm5iMcBsMDuiuB_ZIks5qJapGgaJpZM4IshCe
.

@domluna
Copy link

domluna commented Jun 10, 2016

ldconfig -p | grep lzma
    liblzma.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/liblzma.so.5
    liblzma.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/liblzma.so

ls  -l /usr/lib/x86_64-linux-gnu/ | grep lzma
-rw-r--r--  1 root root    268574 Feb 12  2014 liblzma.a
lrwxrwxrwx  1 root root        38 Feb 12  2014 liblzma.so -> /lib/x86_64-linux-gnu/liblzma.so.5.0.0

ls  -l /lib/x86_64-linux-gnu/ | grep lzma    
lrwxrwxrwx 1 root root      16 Jan 13 21:13 liblzma.so.5 -> liblzma.so.5.0.0
-rw-r--r-- 1 root root  137400 Feb 12  2014 liblzma.so.5.0.0

 ls -l /lib/x86_64-linux-gnu/liblzma.so.5.0.0 
-rw-r--r-- 1 root root 137400 Feb 12  2014 /lib/x86_64-linux-gnu/liblzma.so.5.0.0

Both are symlinked to the same file liblzma.so.5.0.0

@mihahauke
Copy link
Collaborator

We've installed two separate Ubuntus 16.04 and they didn't suffer from lzma problem. Any ideas/tips how to reproduce it?

@domluna
Copy link

domluna commented Jun 11, 2016

Hmm, I'm not sure I've been installing it as part of gym so I tried just to install VizDoom by itself and the cmake configuration throws some errors.

Error output

As a side note the readme says gcc 4.6+ required, does this include gcc 5.x?

gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413 is my default right now. I don't have gcc 4.x installed.

@mihahauke
Copy link
Collaborator

Oh, that might be the issue! I remember I once tried it with gcc 5 and something was wrong. However it was long before the release so I even can't remember details. Anyway I'll check this.

@wjaskowski
Copy link
Collaborator

ViZDoom runs compiled with gcc 5.2.1 without problems on my system.

On 11 June 2016 at 18:35, Michał Kempka notifications@github.com wrote:

Oh, that might be the issue! I remember I once tried it with gcc 5 and
something was wrong. However it was long before the release so I even can't
remember details. Anyway I'll check this.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#75 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEuSHVugkryblR1Fjq0fOt9apkaMEEEZks5qKuPvgaJpZM4IshCe
.

@mihahauke
Copy link
Collaborator

Hmmm same here... I've run it with gym and it works ok.

@domluna
Copy link

domluna commented Jun 11, 2016

Are you using the default python install? I'm using anaconda but I doubt that would be the issue. I doubt that would be the issue. In any case frustrating on my end :-(

@mihahauke
Copy link
Collaborator

I am using the default one but it doesn't sound like python's issue. Run cmake with DBUILD_PYTHON=OFF and we'll know for sure.

@domluna
Copy link

domluna commented Jun 11, 2016

Ok, I ran it like you said and I get to the original error.

[100%] Linking CXX executable ../../../bin/vizdoom
CMakeFiles/vizdoom.dir/tempfiles.cpp.o: In function `FTempFileName::FTempFileName(char const*)':
tempfiles.cpp:(.text+0x7): warning: the use of `tempnam' is dangerous, better use `mkstemp'
//lib/x86_64-linux-gnu/libsystemd.so.0: undefined reference to `lzma_stream_decoder@XZ_5.0'
//lib/x86_64-linux-gnu/libsystemd.so.0: undefined reference to `lzma_end@XZ_5.0'
//lib/x86_64-linux-gnu/libsystemd.so.0: undefined reference to `lzma_code@XZ_5.0'
collect2: error: ld returned 1 exit status
src/vizdoom/src/CMakeFiles/vizdoom.dir/build.make:8868: recipe for target 'bin/vizdoom' failed
make[2]: *** [bin/vizdoom] Error 1
CMakeFiles/Makefile2:860: recipe for target 'src/vizdoom/src/CMakeFiles/vizdoom.dir/all' failed
make[1]: *** [src/vizdoom/src/CMakeFiles/vizdoom.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

But earlier in the output I get this

Scanning dependencies of target lzma
[ 11%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/7zArcIn.o
[ 12%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/7zBuf.o
[ 12%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/7zCrc.o
[ 12%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/7zCrcOpt.o
[ 12%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/7zDec.o
[ 12%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/7zStream.o
[ 13%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Bcj2.o
/home/dom/src/ViZDoom/src/vizdoom/lzma/C/Bcj2.c: In function ‘Bcj2Dec_Decode’:
/home/dom/src/ViZDoom/src/vizdoom/lzma/C/Bcj2.c:235:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         SetUi32(p->temp, val);Z
         ^
[ 13%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Bra.o
[ 13%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Bra86.o
[ 13%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/BraIA64.o
[ 13%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/CpuArch.o
[ 13%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Delta.o
[ 14%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/LzFind.o
[ 14%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Lzma2Dec.o
[ 14%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/LzmaDec.o
[ 14%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/LzmaEnc.o
[ 14%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Ppmd7.o
[ 15%] Building C object src/vizdoom/lzma/CMakeFiles/lzma.dir/C/Ppmd7Dec.o
[ 15%] Linking C static library liblzma.a
[ 15%] Built target lzma

So it links lzma but then I'm guessing calls methods not present in lzma?

@mihahauke
Copy link
Collaborator

Somewhat similar problem: https://groups.google.com/forum/#!topic/caffe-users/0PrZlro7QbU maybe it will help.

@vmonaco
Copy link

vmonaco commented Jun 12, 2016

I had the same issue and using ld.gold seems to have worked:

Check which linker you're using:

ls -l /usr/bin/ld

Install gold and set as default:

apt-get install binutils-gold
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10

Switch between gold and GNU linker:

update-alternatives --config ld

See also here:
hashicorp/vagrant#5118

@domluna
Copy link

domluna commented Jun 12, 2016

@vmonaco thanks looks like it works now!

@wjaskowski
Copy link
Collaborator

@vmonaco thanks for sharing the solution. I wonder now whether this is
problem on the vizdoom or Ubuntu 16.04 side?

On 12 June 2016 at 21:50, Dominique Luna notifications@github.com wrote:

@vmonaco https://github.com/vmonaco thanks looks like it works now!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#75 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEuSHQCbwEgsrZzrROGukPSXb-6Sxqwqks5qLGMMgaJpZM4IshCe
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants