Problem with installation

25 views
Skip to first unread message

Alessandro

unread,
Nov 3, 2025, 5:58:10 AM (2 days ago) Nov 3
to dislin-users

Hello, I am moving my code to a new machine (from SUSE-SLES12 to Debian 13).
In the original version I was using gfortran-8, on the new machine I have gfortran-14.
The version of Dislin I'm using is 11.2.
If I remember correctly, after installation of dislin I should go under $DISLIN/gf, compile dislin.f90 (using gfortran-14) and generate the corresponding library libdislin.a, which should go under $DISLIN. Is this correct? Thanks.

A.V.

Helmut Michels

unread,
Nov 3, 2025, 8:43:47 AM (2 days ago) Nov 3
to dislin-users
Hi Alessandro,

I have tested the latest Dislin distribution 11.5 with Debian 13.1 and gcc/gfortran 14.2. It should work fine.
Yes, you have to compile the file dislin.f90 in the directory $DISLIN/gf with the command  
gfortran -c dislin.f90. After that you can compile and link Dislin programs with

gfortran -c -I$DISLIN/gf    xxx.f90              ! for compiling
gfortran -o xxx xxx.o -L$DISLIN -ldislin     ! for linking

With best regards,

Helmut

Alessandro

unread,
Nov 3, 2025, 9:10:43 AM (2 days ago) Nov 3
to dislin-users

Hello Helmut, when I execute my makefile I get a number of errors of this kind from the link step (just copying the first 5 of them):

/usr/bin/ld: /home/picplus/PIC3D/LIBRARIES/libpthread.so.0: undefined reference to `__libc_dlclose@GLIBC_PRIVATE'
/usr/bin/ld: /home/picplus/PIC3D/LIBRARIES/libpthread.so.0: undefined reference to `__libc_current_sigrtmax_private@GLIBC_PRIVATE'
/usr/bin/ld: /home/picplus/PIC3D/LIBRARIES/libpthread.so.0: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE'
/usr/bin/ld: /home/picplus/PIC3D/LIBRARIES/libpthread.so.0: undefined reference to `__libc_thread_freeres@GLIBC_PRIVATE'
/usr/bin/ld: /home/picplus/PIC3D/LIBRARIES/libpthread.so.0: undefined reference to `__libc_pthread_init@GLIBC_PRIVATE'

Please note that I am trying to link dislin using  -L$DISLIN -ldislin, while I am using static linking for the following graphics libraries:
 
   libXm.so.4
   libXt.so.6
   libX11.so.6
   libGL.so.1

Actually I also would like to use static linking for dislin which is what I had on the old machine (I attach my makefile, in case it can be clearer...).
Thanks.

A.
MakePic

Helmut Michels

unread,
Nov 3, 2025, 9:52:18 AM (2 days ago) Nov 3
to dislin-users
Dear Alessandro,

static linking with the Dislin library libdislin.a is working  on Debian 13 with the command

 gfortran -o xxx xxx.o  $DISLIN/libdislin.a -lX11 -lXt -lXm -lGL

It looks like that the error messages are caused by the library libpthread.so.0, not by Dislin.
Are you using your own version of libpthread.so.0?

With best regards,

Helmut

Alessandro

unread,
Nov 3, 2025, 10:39:37 AM (2 days ago) Nov 3
to dislin-users

Ok, I think I have fixed the problem with libpthread.

The error which I get now is: 
libdislin.a(texmod_.o): relocation R_X866_64_32 against  `.text' can not be used when making a PIE object; recompile with -fPIE

Does this mean that under  $DISLIN/gf I should compile dislin.f90 with this option? If I do so, and then create the .a library using:
ar rcs libdislin.a dislin.o

I get a libdislin.a file of size 940, while the one under $DISLIN has a size of 4231828....

Helmut Michels

unread,
Nov 3, 2025, 11:19:18 AM (2 days ago) Nov 3
to dislin-users
Hi Alessandro,

the file dislin.f90 has nothing to do with the Dislin library libdislin.a. dislin.f90 contains just the
definitions of all Dislin routines and functions how they must be called in Fortran 90 programs.
It helps the compiler to detect errors during the compilation process
libdislin.a and libdislin.so contain the compiled Dislin source code.

Does the error also appear with the current version 11.5 of Dislin? Since version 11.3.3 of Dislin
the static libraries of Dislin are also created with the compiler option -fPIC for creating  
position-independent code.

With best regards,

Helmut

Alessandro

unread,
Nov 4, 2025, 3:14:40 AM (yesterday) Nov 4
to dislin-users

Hello Helmut, I installed latest version of Dislin, and now the code compiles with no errors. Thank you.
However, I have an error now when I launch the code:
 
XmGetDefaultDisplay cannot be used prior to Vendors.Initialize, returns NULL
Error: Couldn't find per display information

This should not be related with Dislin, but maybe with the fact that I'm working on a remote virtual machine and I need 
X11 to redirect output on my screen...

A.

Helmut Michels

unread,
Nov 4, 2025, 9:55:11 AM (yesterday) Nov 4
to dislin-users
Hi,

I haven't had this error message until yet. Do you get the same error message if you start another
X11 application on the Debian system, for example xclock? What kind of operating system has the
machine from which you connect to Debian? Is it a macOS system? 

With best regards,

Helmut

Alessandro

unread,
Nov 4, 2025, 10:12:32 AM (yesterday) Nov 4
to dislin-users

xclock works fine... :-)
My pc has windows enterprise v11, and I connect to the Debian (virtual) machine using remote desktop.

Helmut Michels

unread,
6:24 AM (9 hours ago) 6:24 AM
to dislin-users
Hi Alessandro,

I could now reproduce the XmGetDefaultDisplay  error for static linking on my Debian system. I think 
that the problem is caused by a bad sequence of link libraries. You should first link the Dislin library
to your program, and then the libXm, libXt and libX11 libraries. 

The following link command was working for me:

gfortran -o map_f90 map_f90.o  $DISLIN/libdislin.a -lXm -lXt -lX11 -lGL

The command

gfortran -o map_f90 map_f90.o  $DISLIN/libdislin.a  -lX11 -lXt -lXm -lGL
   
produces the  error message above at runtime. 

With best regards,

Helmut

Alessandro

unread,
9:22 AM (6 hours ago) 9:22 AM
to dislin-users
Hello Helmut, you got it, it works fine if I link the libraries in the right order. 
Thank you very much for your support, you are always very helpful!
As I originally developed the code using Dislin 11.2 and now I switched to 11.5, can I expect full compatibility or there's a possibility of a different behaviour of some of the calls?

A.

Reply all
Reply to author
Forward
0 new messages