By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2109 - Build issue: tdelibs on openbsd
Summary: Build issue: tdelibs on openbsd
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdelibs (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Other
: P5 normal
Assignee: Francois Andriot
URL:
Depends on:
Blocks:
 
Reported: 2014-09-06 09:17 CDT by Francois Andriot
Modified: 2014-10-11 10:51 CDT (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
tdelibs: add tdehwlib option, fix libdl detection, fix other header detections (3.15 KB, patch)
2014-09-06 09:25 CDT, Francois Andriot
Details | Diff
tdelibs: enable previously disabled build option in config.h (1.41 KB, patch)
2014-09-06 09:26 CDT, Francois Andriot
Details | Diff
tdelibs: enable conditional build of tdehwlib (part 1) + fix ftbfs because missing link to "util" library (1.27 KB, patch)
2014-09-06 09:27 CDT, Francois Andriot
Details | Diff
tdelibs: enable conditional build of tdehwlib (part 2) (2.01 KB, patch)
2014-09-06 09:28 CDT, Francois Andriot
Details | Diff
tdelibs: enable conditional build of tdehwlib (part 3) (1.05 KB, patch)
2014-09-06 09:28 CDT, Francois Andriot
Details | Diff
tdelibs: enable conditional build of tdehwlib (part 4) (655 bytes, patch)
2014-09-06 09:29 CDT, Francois Andriot
Details | Diff
tdelibs: enable conditional build of tdehwlib (part 5) (745 bytes, patch)
2014-09-06 09:29 CDT, Francois Andriot
Details | Diff
tdelibs: add support for openbsd pty in kpty (1010 bytes, patch)
2014-09-06 09:32 CDT, Francois Andriot
Details | Diff
tdelibs: add support for openbsd in kresolver (1/2) (7.11 KB, patch)
2014-09-06 09:33 CDT, Francois Andriot
Details | Diff
tdelibs: add support for openbsd in kresolver (2/2) (488 bytes, patch)
2014-09-06 09:33 CDT, Francois Andriot
Details | Diff
tdelibs: fix FTBFS because Linux specific include in tdeapplication.cpp (288 bytes, patch)
2014-09-06 09:34 CDT, Francois Andriot
Details | Diff
tdelibs: add 'tdesu' to tdeioslave_file mount/umount command (1.11 KB, patch)
2014-09-06 09:38 CDT, Francois Andriot
Details | Diff
tdelibs: fix security issue in tdeioslave_ftp (518 bytes, patch)
2014-09-06 09:39 CDT, Francois Andriot
Details | Diff
tdelibs: fix FTBFS because undefined __progname in tdeio_connection (319 bytes, patch)
2014-09-06 09:39 CDT, Francois Andriot
Details | Diff
tdelibs: disable environment-based completion in kurlcompletion (574 bytes, patch)
2014-09-06 09:41 CDT, Francois Andriot
Details | Diff
tdelibs: fix cupsd process detection (875 bytes, patch)
2014-09-06 09:42 CDT, Francois Andriot
Details | Diff
tdelibs: fix cups default directories (1.92 KB, patch)
2014-09-06 09:43 CDT, Francois Andriot
Details | Diff
tdelibs: fix FTBFS because hardcoded link to "dl" library (366 bytes, patch)
2014-09-06 09:44 CDT, Francois Andriot
Details | Diff
tdelibs: fix tdesu process handling (454 bytes, patch)
2014-09-06 09:45 CDT, Francois Andriot
Details | Diff
tdelibs: fix default spell checker in openbsd (520 bytes, patch)
2014-09-06 09:46 CDT, Francois Andriot
Details | Diff
Enable condition build of tdehwlib (7.21 KB, patch)
2014-10-05 12:25 CDT, Slávek Banko
Details | Diff
tdelibs: fix openpty detection on openbsd (1.00 KB, patch)
2014-10-06 14:32 CDT, Francois Andriot
Details | Diff
tdelibs: fix ucred support in openbsd (446 bytes, patch)
2014-10-08 13:05 CDT, Francois Andriot
Details | Diff
tdelibs: fix linking to Xext library (1.90 KB, patch)
2014-10-08 13:21 CDT, Francois Andriot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Andriot 2014-09-06 09:17:42 CDT
This bug report is intended to post all patches required to build tdelibs on openbsd.
Comment 1 Francois Andriot 2014-09-06 09:25:52 CDT
Created attachment 2156 [details]
tdelibs: add tdehwlib option, fix libdl detection, fix other header detections

Under openbsd, there are some problem with the cmake function "check_include_file".

The following headers are impacted:
  net/if.h
  sys/mount.h
  sys/ucred.h

Same problem with "check_function_exists" for "alloca".

The cmake sample program that is used to test the availability of these headers generates a FTBFS either because of undeclared type in source code (e.g: "size_t is undefined"), or problem at linking (e.g. missing library)

It looks like MANY openbsd system header files actually require "#include <stdlib.h>", but this line is not present in the header...
Comment 2 Francois Andriot 2014-09-06 09:26:41 CDT
Created attachment 2157 [details]
tdelibs: enable previously disabled build option in config.h
Comment 3 Francois Andriot 2014-09-06 09:27:49 CDT
Created attachment 2158 [details]
tdelibs: enable conditional build of tdehwlib (part 1) + fix ftbfs because missing link to "util" library
Comment 4 Francois Andriot 2014-09-06 09:28:27 CDT
Created attachment 2159 [details]
tdelibs: enable conditional build of tdehwlib (part 2)
Comment 5 Francois Andriot 2014-09-06 09:28:50 CDT
Created attachment 2160 [details]
tdelibs: enable conditional build of tdehwlib (part 3)
Comment 6 Francois Andriot 2014-09-06 09:29:30 CDT
Created attachment 2161 [details]
tdelibs: enable conditional build of tdehwlib (part 4)
Comment 7 Francois Andriot 2014-09-06 09:29:45 CDT
Created attachment 2162 [details]
tdelibs: enable conditional build of tdehwlib (part 5)
Comment 8 Francois Andriot 2014-09-06 09:32:22 CDT
Created attachment 2163 [details]
tdelibs: add support for openbsd pty in kpty

I'm not sure this patch actually works or is correct.
It is based on a kdelibs3 patch from openbsd.
Comment 9 Francois Andriot 2014-09-06 09:33:34 CDT
Created attachment 2164 [details]
tdelibs: add support for openbsd in kresolver (1/2)

Patch from kdelibs3 on openbsd.
Comment 10 Francois Andriot 2014-09-06 09:33:53 CDT
Created attachment 2165 [details]
tdelibs: add support for openbsd in kresolver (2/2)
Comment 11 Francois Andriot 2014-09-06 09:34:34 CDT
Created attachment 2166 [details]
tdelibs: fix FTBFS because Linux specific include in tdeapplication.cpp
Comment 12 Francois Andriot 2014-09-06 09:38:31 CDT
Created attachment 2167 [details]
tdelibs: add 'tdesu' to tdeioslave_file mount/umount command

openbsd has no support for HAL nor TDEHWLIB.
The only way to handle removable drives is direct mount/umount command.
These command can only work as root user, so tdesu is needed here.
(patch from kdelibs3 openbsd)
Comment 13 Francois Andriot 2014-09-06 09:39:03 CDT
Created attachment 2168 [details]
tdelibs: fix security issue in tdeioslave_ftp

Patch from kdelibs3 openbsd.
Comment 14 Francois Andriot 2014-09-06 09:39:50 CDT
Created attachment 2169 [details]
tdelibs: fix FTBFS because undefined __progname in tdeio_connection
Comment 15 Francois Andriot 2014-09-06 09:41:14 CDT
Created attachment 2170 [details]
tdelibs: disable environment-based completion in kurlcompletion

Under openbsd, there is no such thing as "extern char **environ".
So the environment-related code would need to be modified here ...
Comment 16 Francois Andriot 2014-09-06 09:42:31 CDT
Created attachment 2171 [details]
tdelibs: fix cupsd process detection

There is no "/proc" filesystem under openbsd. We detect running processes by using it.
(patch from kdelibs3 openbsd)
Comment 17 Francois Andriot 2014-09-06 09:43:39 CDT
Created attachment 2172 [details]
tdelibs: fix cups default directories

Under openbsd, most programs are installed under "/usr/local" instead of just "/usr".
Many path, including cups, must be modified accordingly.
(patch from kdelibs3 openbsd)
Comment 18 Francois Andriot 2014-09-06 09:44:40 CDT
Created attachment 2173 [details]
tdelibs: fix FTBFS because hardcoded link to "dl" library
Comment 19 Francois Andriot 2014-09-06 09:45:32 CDT
Created attachment 2174 [details]
tdelibs: fix tdesu process handling

patch from kdelibs3 openbsd.
Not sure, but it is probably a security fix.
Comment 20 Francois Andriot 2014-09-06 09:46:30 CDT
Created attachment 2175 [details]
tdelibs: fix default spell checker in openbsd

openbsd use aspell only, not ispell. Use aspell by default.
(patch from kdelibs3 openbsd)
Comment 21 Slávek Banko 2014-10-05 07:48:21 CDT
Comment on attachment 2173 [details]
tdelibs: fix FTBFS because hardcoded link to "dl" library

With part from attachmen 2156 pushed to GIT in hash af2c2afb.
Comment 22 Slávek Banko 2014-10-05 09:45:37 CDT
Comment on attachment 2163 [details]
tdelibs: add support for openbsd pty in kpty

Pushed to GIT in hash e61585ed.
Comment 23 Slávek Banko 2014-10-05 09:46:18 CDT
Comment on attachment 2164 [details]
tdelibs: add support for openbsd in kresolver (1/2)

Pushed to GIT in hash 439f3ba7.
Comment 24 Slávek Banko 2014-10-05 09:46:47 CDT
Comment on attachment 2165 [details]
tdelibs: add support for openbsd in kresolver (2/2)

Pushed to GIT in hash 439f3ba7.
Comment 25 Slávek Banko 2014-10-05 09:47:21 CDT
Comment on attachment 2166 [details]
tdelibs: fix FTBFS because Linux specific include in tdeapplication.cpp

Pushed to GIT in hash 8f3cf10d.
Comment 26 Slávek Banko 2014-10-05 09:48:03 CDT
Comment on attachment 2167 [details]
tdelibs: add 'tdesu' to tdeioslave_file mount/umount command

Pushed to GIT in hash b588c6e6.
Comment 27 Slávek Banko 2014-10-05 09:48:46 CDT
Comment on attachment 2169 [details]
tdelibs: fix FTBFS because undefined __progname in tdeio_connection

Pushed to GIT in hash 9c7a8637.
Comment 28 Slávek Banko 2014-10-05 09:49:23 CDT
Comment on attachment 2170 [details]
tdelibs: disable environment-based completion in kurlcompletion

Pushed to GIT in hash 78a66b11.
Comment 29 Slávek Banko 2014-10-05 09:49:57 CDT
Comment on attachment 2171 [details]
tdelibs: fix cupsd process detection

Pushed to GIT in hash 754647ba.
Comment 30 Slávek Banko 2014-10-05 09:50:28 CDT
Comment on attachment 2172 [details]
tdelibs: fix cups default directories

Pushed to GIT in hash 69e7a5c4.
Comment 31 Slávek Banko 2014-10-05 09:51:02 CDT
Comment on attachment 2175 [details]
tdelibs: fix default spell checker in openbsd

Pushed to GIT in hash cca50763.
Comment 32 Slávek Banko 2014-10-05 12:25:11 CDT
Created attachment 2285 [details]
Enable condition build of tdehwlib

I believe that to enable / disable tdehwlib is not sufficient to use the build option. All programs that use kinstance.h would have properly set WITH_TDEHWLIB during build. And that's not good.

I have therefore prepared a solution where the value is written to kdemacros.h, and everything then uses the definition __TDE_HAVE_TDEHWLIB.

Please test it.
Comment 33 Francois Andriot 2014-10-06 14:30:55 CDT
Comment on attachment 2285 [details]
Enable condition build of tdehwlib

Patch works as expected on OpenBSD.
Comment 34 Francois Andriot 2014-10-06 14:32:47 CDT
Created attachment 2287 [details]
tdelibs: fix openpty detection on openbsd

Another library detection issue:
under openbsd, there is no "pty.h" file, but the "openpty" function is defined in "util.h" .
This patch allows  detection of "openpty" function in both files.
Comment 35 Slávek Banko 2014-10-07 04:21:56 CDT
Comment on attachment 2157 [details]
tdelibs: enable previously disabled build option in config.h

Pushed to GIT in hash 223f0c75
Comment 36 Slávek Banko 2014-10-07 04:22:28 CDT
Comment on attachment 2287 [details]
tdelibs: fix openpty detection on openbsd

Pushed to GIT in hash e255a8ca
Comment 37 Slávek Banko 2014-10-07 04:23:03 CDT
Comment on attachment 2285 [details]
Enable condition build of tdehwlib

Pushed to GIT in hash 84e3f9e0
Comment 38 Francois Andriot 2014-10-08 13:05:32 CDT
Created attachment 2293 [details]
tdelibs: fix ucred support in openbsd
Comment 39 Francois Andriot 2014-10-08 13:21:16 CDT
Created attachment 2294 [details]
tdelibs: fix linking to Xext library

This patch adds a cmake detection for Xext library.
Add missing link flag in tdeui.
Remove hardcoded Xext flags in tderandr and tdestyles/keramik.
Comment 40 Slávek Banko 2014-10-10 07:48:46 CDT
Comment on attachment 2293 [details]
tdelibs: fix ucred support in openbsd

Pushed to GIT in hash 3adf509a.
Comment 41 Slávek Banko 2014-10-10 07:49:18 CDT
Comment on attachment 2294 [details]
tdelibs: fix linking to Xext library

Pushed to GIT in hash aae8990d.
Comment 42 Slávek Banko 2014-10-11 10:37:57 CDT
Comment on attachment 2168 [details]
tdelibs: fix security issue in tdeioslave_ftp

Rejected - is already applied on 3.5.10 sources.
Comment 43 Slávek Banko 2014-10-11 10:48:18 CDT
Comment on attachment 2174 [details]
tdelibs: fix tdesu process handling

Pushed to GIT in hash c8b810f1.
Comment 44 Slávek Banko 2014-10-11 10:51:01 CDT
All patches are now committed. Therefore now I closed this bug report. If you will have any more patches, please reopen it.