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

Missing library link #6

Closed
ndowens opened this issue Jan 8, 2020 · 9 comments · Fixed by #7
Closed

Missing library link #6

ndowens opened this issue Jan 8, 2020 · 9 comments · Fixed by #7

Comments

@ndowens
Copy link
Contributor

ndowens commented Jan 8, 2020

[ 12%] Linking CXX executable ../icesh
/usr/bin/ld: /tmp/icesh.kf16zL.ltrans0.ltrans.o: in function IceSh::spy()': <artificial>:(.text+0x1033): undefined reference to walltime()'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/icesh.dir/build.make:144: icesh] Error 1
make[1]: *** [CMakeFiles/Makefile2:275: src/CMakeFiles/icesh.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

@gijsbers
Copy link
Contributor

gijsbers commented Jan 8, 2020

Thanks! The cmake build is easy to forget...

@bdubbs
Copy link

bdubbs commented Jan 9, 2020

The cmake fix proposed was insufficient for me. After the fix I get:

Linking CXX executable ../icesh
cd /build/icewm/icewm-1.6.4/build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/icesh.dir/link.txt --verbose=1
/usr/bin/c++ -O3 -DNDEBUG -lXrandr -lXinerama -Wl,--as-needed CMakeFiles/icesh.dir/icesh.cc.o CMakeFiles/icesh.dir/misc.cc.o CMakeFiles/icesh.dir/mstring.cc.o CMakeFiles/icesh.dir/ref.cc.o CMakeFiles/icesh.dir/yarray.cc.o CMakeFiles/icesh.dir/ytimer.cc.o -o ../icesh -L/opt/xorg/lib -lXext -L/opt/xorg/lib -lXrandr -L/opt/xorg/lib -lXinerama -L/opt/xorg/lib -lX11
/usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::~YTimer()': ytimer.cc:(.text+0x234): undefined reference to mainLoop'
/usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::startTimer(long)': ytimer.cc:(.text+0x393): undefined reference to DelayFuzziness'
/usr/bin/ld: ytimer.cc:(.text+0x3b5): undefined reference to mainLoop' /usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::startTimer()':
ytimer.cc:(.text+0x6dd): undefined reference to DelayFuzziness' /usr/bin/ld: ytimer.cc:(.text+0x703): undefined reference to mainLoop'
/usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::fuzzTimer()': ytimer.cc:(.text+0x9cc): undefined reference to DelayFuzziness'
/usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::runTimer()': ytimer.cc:(.text+0xc0e): undefined reference to DelayFuzziness'
/usr/bin/ld: ytimer.cc:(.text+0xc30): undefined reference to mainLoop' /usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::stopTimer()':
ytimer.cc:(.text+0xe50): undefined reference to mainLoop' /usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::enlist(bool)':
ytimer.cc:(.text+0xe80): undefined reference to mainLoop' /usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::disableTimerListener(YTimerListener*)':
ytimer.cc:(.text+0xed0): undefined reference to mainLoop' /usr/bin/ld: CMakeFiles/icesh.dir/ytimer.cc.o: in function YTimer::setTimer(long, YTimerListener*, bool)':
ytimer.cc:(.text+0xf13): undefined reference to `mainLoop'
collect2: error: ld returned 1 exit status

@ndowens
Copy link
Contributor Author

ndowens commented Jan 9, 2020 via email

@bdubbs
Copy link

bdubbs commented Jan 9, 2020

I'll note that it builds fine with autotools.

@ndowens
Copy link
Contributor Author

ndowens commented Jan 9, 2020 via email

@bdubbs
Copy link

bdubbs commented Jan 9, 2020

I am using the instructions at
http://www.linuxfromscratch.org/blfs/view/svn/x/icewm.html
but with git master.

None of the defines should make any difference for internal references.

@ndowens
Copy link
Contributor Author

ndowens commented Jan 9, 2020 via email

@bdubbs
Copy link

bdubbs commented Jan 9, 2020

I tried with a couple of variations. It looks like -DENABLE_LTO=ON is the option that fixes the problem.

@ndowens
Copy link
Contributor Author

ndowens commented Jan 9, 2020 via email

@ndowens ndowens mentioned this issue Jan 9, 2020
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

Successfully merging a pull request may close this issue.

3 participants