FLTK logo

Re: [fltk.general] How to build/install fltk 1.3.5 on Ubuntu 20.04

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: How to build/install fltk 1.3.5 on Ubuntu 20.04 Albrecht Schlosser Oct 14, 2020  
 
On 10/14/20 7:07 PM Hui Peng, Alan Ng wrote:
Greetings

I am trying to install fltk 1.3.5 on Ubuntu 20.04 without success. I have used the following 3 bash shell commands, including results from the last command -

alan@alan-Aspire-E1-422:~/reference/fltk-1.3.5$ ./configure --enable-debug --disable-gl --enable-shared --enable-threads --enable-xdbe --enable-xft --includedir=/home/alan/reference/fltk-1.3.5/include --bindir=/home/alan/reference/fltk-1.3.5/bin --libdir=/home/alan/reference/fltk-1.3.5/lib --prefix=/home/alan/reference/fltk-1.3.5

alan@alan-Aspire-E1-422:~/reference/fltk-1.3.5$ make

alan@alan-Aspire-E1-422:~/reference/fltk-1.3.5$ sudo make install
=== installing FL ===
Installing include files in /home/alan/reference/fltk-1.3.5/include...
=== installing jpeg ===
Installing ../lib/libfltk_jpeg.a in /home/alan/reference/fltk-1.3.5/lib...
/usr/bin/install: '../lib/libfltk_jpeg.a' and '/home/alan/reference/fltk-1.3.5/lib/libfltk_jpeg.a' are the same file
make[1]: *** [Makefile:103: install] Error 1
make: *** [Makefile:33: install] Error 1

config.log is attached for reference.

You are trying to install (with `sudo make install`) to the same directory you're building FLTK in (error: "'../lib/libfltk_jpeg.a' and '/home/alan/reference/fltk-1.3.5/lib/libfltk_jpeg.a' are the same file").

There are some issues with your commands:

(1) You do not need to "install" FLTK to use it. If your build (2nd command: 'make') worked w/o errors you're ready to use FLTK in another project and you can run the example programs in the test/ folder.

(2) Several of your ./configure command switches are default so you don't need them, for instance "--enable-threads --enable-xdbe --enable-xft". You can safely remove these commandline switches.

(3) The following switches are (AFAICT) redundant or even wrong. You should remove those.

> --includedir=/home/alan/reference/fltk-1.3.5/include
> --bindir=/home/alan/reference/fltk-1.3.5/bin
> --libdir=/home/alan/reference/fltk-1.3.5/lib

(4) You don't need `sudo' if you (really) want to "install" the FLTK libs to a subdirectory of your home folder (if that's what you did). You need `sudo' only if you install to a system directory.

(5) If you really want to "install" FLTK (that's fine although not necessary) and want to use a subdirectory of your home folder I suggest to use something where you'll maybe install other software as well, e.g. '/home/alan/dev' or another appropriate directory (not the source directory of FLTK).

That all said, your configure, build, and install commands might look like this:

$ ./configure --enable-debug --disable-gl --enable-shared --prefix=/home/alan/dev

$ make

$ make install

Note that --prefix is used for the install target folder, change this as required.

One last hint: I'd try to use the defaults when building new software and amend the commands only when needed. The default values are usually (and in the FLTK case definitely) a good starting point.

Welcome to the FLTK community, have fun!

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/9dac3880-ea64-f7b8-d344-a4ea95397288%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.