cosmos72 / twin

Text mode window environment. A "retro" program for embedded or remote systems, that doubles as X11 terminal and text-mode equivalent of VNC server
Other
661 stars 39 forks source link

I can't compile on Ubuntu 20.04 #82

Closed Neflyte49 closed 1 year ago

Neflyte49 commented 1 year ago

Hi I tried it but this error happens: /bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++98 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall -Wshadow -Wno-uninitialized -Wno-unused -Wundef -Wcast-qual -Wcast-align -Wpointer-arith -Wwrite-strings -o twtest test_stl_chars.o test_stl_fmt.o test_stl_utf8.o test_stl_vector.o test_main.o ../libs/libtstl/libtstl.la libtool: link: g++ -g -O2 -std=c++98 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall -Wshadow -Wno-uninitialized -Wno-unused -Wundef -Wcast-qual -Wcast-align -Wpointer-arith -Wwrite-strings -o .libs/twtest test_stl_chars.o test_stl_fmt.o test_stl_utf8.o test_stl_vector.o test_main.o ../libs/libtstl/.libs/libtstl.so /usr/bin/ld: ../libs/libtstl/.libs/libtstl.so: undefined reference to `dlerror' collect2: error: ld returned 1 exit status make[2]: [Makefile:446: twtest] Error 1 make[2]: Leaving directory '/home/israeru/twin/test' make[1]: [Makefile:503: all-recursive] Error 1 make[1]: Leaving directory '/home/israeru/twin/test' make: *** [Makefile:518: all-recursive] Error 1 uname -a Linux israeru-Inspiron-5721 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Can you help me?

Mirppc commented 1 year ago

That is very odd as it is compiling just fine on Ubuntu 22.04.

Do you have all the dependencies installed? the development dependencies.

The last time i ran into an error like that i was missing a devel or dev package. So my suggestion would be to recheck your installed dependencies or figure out what package provides libstl.

rogersavage commented 1 year ago

I'm on Debian 11 and I had the same problem, after installing the dependencies listed in the Twin readme.

When I started trying to track it down, grep revealed that dlerror() is only called once. I commented out line 44 of libs/libtstl/err.cpp and that allowed me to compile. I have Twin running apparently ok at the moment, but I'll chime in again if I can figure out how to actually fix the problem.

Edit: I've never had to use ldconfig before. I ran sudo ldconfig between configure and make, but maybe I need to pass it some arguments? Not sure what I'm doing here. Researching.

Edit 2: Ok, so after some searching, I found dlfcn.h in my /usr/include directory. I added /usr/include to my /etc/ld.so.conf.d/libc.conf, re-ran sudo ldconfig, then recompiled and now it works without the reference to dlerror commented out. I don't know if this is the correct solution, maybe someone more knowledgeable can comment, but it worked for me.

dgbiotext commented 1 year ago

@rogersavage

Thanks for your troubleshooting! FWIW, I found that commenting out that line allowed compilation, but the changes to libc.conf did not not help, though I do have dlfcn.h in the place you noted.

Tried on 2 computers -- both Debian 11.6, one i386 one AMD64. Exactly the same problems on both. Happy to have it working!

cosmos72 commented 1 year ago

It looks like library libdl is missing during linking. I will fix it ASAP.

cosmos72 commented 1 year ago

Commit b6e4e4bbae457447792a6d7b899e966c2b6571be should fix this issue.

dgbiotext commented 1 year ago

Happy to report vanilla build worked out of the box. Thanks so much!