Laidout / laxkit

The Laxkit, a windowing toolkit.
GNU Lesser General Public License v3.0
5 stars 5 forks source link

Trying to compile laxkit on FreeBSD (fails) #7

Open probonopd opened 3 years ago

probonopd commented 3 years ago

Trying to compile laxkit on FreeBSD with the ultimate objective of compiling Laidout on FreeBSD.

Issue 1: Hardcoded path to cups

FreeBSD% ./configure     
(...)
Checking for cups......You need to install the development package of Cups.

Debugging using truss, it turns out /usr/include/cups is hardcoded:

FreeBSD% truss ./configure --disable-sqlite --relocatable 2>&1 | grep cups Checking for cups......write(1,"Checking for cups......",23) = 23 (0x17) fstatat(AT_FDCWD,"/usr/include/cups",0x7fffffffe0f8,0x0) ERR#2 'No such file or directory'

On FreeBSD, the string /usr/include/cups must be changed to /usr/local/include/cups in configure. Then it runs without issues.

A better solution would be not to hardcode this string.

Issue 2: Includes are not found

gmake
(...)
fileutils.cc:815:10: error: use of undeclared identifier 'get_current_dir_name'   

I don't know how to fix this. Adding #define _GNU_SOURCE at the top of the file did not help.

tomlechner commented 3 years ago

Hopefully fixed.

Regarding cups, I switched to check for an existing cups-config command (which should imply availability of headers). Also, technically I don't currently really use anything from cups except a temp file creation. If it is still a problem it wouldn't take much to remove cups dependency. However, if I ever finish implementing lax/printdialog.cc cups will be necessary, though.

Also added a workaround for missing get_current_dir_name() when _GNU_SOURCE is not defined. Hopefully that works!

.....edit: D'oh! just committed a fixed typo in the conditional section that would break compilation.

tomlechner commented 3 years ago

Is it working now?

probonopd commented 3 years ago

Hello @tomlechner, thanks for your attempted fix; unfortunately it is not really fully working yet, I will test deeper once I get around to it.

tomlechner commented 2 years ago

I don't have a way to test, but this might be fixed with Laidout/laxkit#8 ?