GithubHelp home page GithubHelp logo

Linking issues under linux about fltkhs HOT 10 OPEN

deech avatar deech commented on May 26, 2024
Linking issues under linux

from fltkhs.

Comments (10)

deech avatar deech commented on May 26, 2024

From the output it looks like you might have the wrong version of fltk installed. What is the output of fltk-config --version? If it is 1.3.3 can you post the output of ls <your-lib-directory>/libfltk*?

from fltkhs.

redneb avatar redneb commented on May 26, 2024

The fltk version is 1.3.3, as your instructions specify.

Gentoo installs the .so & .a files of fltk in a dedicated directory:

# ls -lh /usr/lib/fltk
total 4.9M
-rwxr-xr-x 1 root root 3.1M Mar  4 23:03 libfltk.a
-rwxr-xr-x 1 root root 5.8K Mar  4 23:03 libfltk_cairo.a
lrwxrwxrwx 1 root root   20 Mar  4 23:03 libfltk_cairo.so -> libfltk_cairo.so.1.3
-rwxr-xr-x 1 root root 9.8K Mar  4 23:03 libfltk_cairo.so.1.3
-rwxr-xr-x 1 root root  60K Mar  4 23:03 libfltk_forms.a
lrwxrwxrwx 1 root root   20 Mar  4 23:03 libfltk_forms.so -> libfltk_forms.so.1.3
-rwxr-xr-x 1 root root  27K Mar  4 23:03 libfltk_forms.so.1.3
-rwxr-xr-x 1 root root 359K Mar  4 23:03 libfltk_gl.a
lrwxrwxrwx 1 root root   17 Mar  4 23:03 libfltk_gl.so -> libfltk_gl.so.1.3
-rwxr-xr-x 1 root root 114K Mar  4 23:03 libfltk_gl.so.1.3
-rwxr-xr-x 1 root root 110K Mar  4 23:03 libfltk_images.a
lrwxrwxrwx 1 root root   21 Mar  4 23:03 libfltk_images.so -> libfltk_images.so.1.3
-rwxr-xr-x 1 root root  56K Mar  4 23:03 libfltk_images.so.1.3
lrwxrwxrwx 1 root root   14 Mar  4 23:03 libfltk.so -> libfltk.so.1.3
-rwxr-xr-x 1 root root 1.1M Mar  4 23:03 libfltk.so.1.3

The location of the libraries seems to be the problem. If I manually copy them to /usr/lib then everything works fine.

from fltkhs.

deech avatar deech commented on May 26, 2024

What is the output of fltk-config --ldstaticflags --use-gl --use-images --use-glut? That is the command fltkhs uses to determine the location of the libraries.

from fltkhs.

redneb avatar redneb commented on May 26, 2024
$ fltk-config --ldstaticflags --use-gl --use-images --use-glut
/usr/lib64/fltk/libfltk_images.a -lpng -lz -ljpeg /usr/lib64/fltk/libfltk_gl.a -lGLU -lGL /usr/lib64/fltk/libfltk.a -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11

so it reports the correct paths (i.e. in /usr/lib/fltk).

from fltkhs.

deech avatar deech commented on May 26, 2024

Yes, I think I see the problem. This is a bug. When building it expects fltk_gl etc. to be in a place that can be found using AC_CHECK_LIB but this doesn't make much sense when fltk-config already has that information. I'll fix it. Thanks for the report!

from fltkhs.

mrak avatar mrak commented on May 26, 2024

I'm seeing this in x86_64 Arch Linux, too, when trying to compile fltkhs as a project dependency using stack. Tons of output complaining about undefined references from the cpp files.

$ fltk-config --version
1.3.3

$ ls /usr/lib/libfltk*
/usr/lib/libfltk_forms.so
/usr/lib/libfltk_forms.so.1.3
/usr/lib/libfltk_gl.s0
/usr/lib/libfltk_gl.so.1.3
/usr/lib/libfltk_images.so
/usr/lib/libfltk_images.so.1.3
/usr/lib/libfltk.so
/usr/lib/libfltk.so.1.3

$ fltk-config --ldstaticflags --use-gl --use-images --use-glut
-Wl,-O1,--sort-common,--as-needed,-z,relro

:(

from fltkhs.

deech avatar deech commented on May 26, 2024

This is happening because the Arch package isn't installing the statically linked versions of those libs which are required by fltkhs. That's why the installation instructions suggest building from source (https://github.com/deech/fltkhs#linux-and-bsd). I just did that on Arch and fltkhs worked.

from fltkhs.

deech avatar deech commented on May 26, 2024

@redneb, I fixed your issue sometime ago. Would you mind reviewing and closing? @mrak, did that work for you?

from fltkhs.

redneb avatar redneb commented on May 26, 2024

Nope, unfortunately I still cannot compile the latest fltkhs from git in my system because of linking problems.

from fltkhs.

mrak avatar mrak commented on May 26, 2024

@deech after changing !staticlibs to staticlibs in /etc/makepkg.conf it all compiles correctly :) Thanks for pointing out the static linking requirement.

from fltkhs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.