Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 783936 - www-servers/lighttpd-1.4.58[nss -ssl] - In file included from /usr/include/nss/nss.h:34, from sys-crypto-md.h:715, from algo_md5.c:3: /usr/include/nss/seccomon.h:17:10: fatal error: prtypes.h: No such file or directory
Summary: www-servers/lighttpd-1.4.58[nss -ssl] - In file included from /usr/include/ns...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Herb Miller Jr.
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-04-18 22:26 UTC by ernsteiswuerfel
Modified: 2021-10-11 02:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (lighttpd-1.4.58:20210418-220942.log,38.90 KB, text/plain)
2021-04-18 22:26 UTC, ernsteiswuerfel
Details
emerge --info (file_783936.txt,5.91 KB, text/plain)
2021-04-18 22:27 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2021-04-18 22:26:37 UTC
Created attachment 700626 [details]
build.log

[...]
powerpc64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -DHAVE_VERSIONSTAMP_H -DLIBRARY_DIR="\"/usr/lib64/lighttpd\"" -DSBIN_DIR="\"/usr/sbin\"" -I. -I..    -D_REENTRANT -I/usr/include/nspr4  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES   -O2 -mcpu=970 -pipe -Wall -W -Wshadow -pedantic -c -o lighttpd-fdevent_select.o `test -f 'fdevent_select.c' || echo './'`fdevent_select.c
In file included from /usr/include/nss/nss.h:34,
                 from sys-crypto-md.h:715,
                 from algo_md5.c:3:
/usr/include/nss/seccomon.h:17:10: fatal error: prtypes.h: No such file or directory
   17 | #include "prtypes.h"
      |          ^~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:3411: lighttpd-algo_md5.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /usr/include/nss/nss.h:34,
                 from sys-crypto-md.h:715,
                 from algo_sha1.c:4:
/usr/include/nss/seccomon.h:17:10: fatal error: prtypes.h: No such file or directory
   17 | #include "prtypes.h"
      |          ^~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:3425: lighttpd-algo_sha1.o] Error 1
make[2]: *** [Makefile:1906: all] Error 2
make[1]: *** [Makefile:467: all-recursive] Error 1
make: *** [Makefile:397: all] Error 2
 * ERROR: www-servers/lighttpd-1.4.58::gentoo failed (compile phase):
Comment 1 ernsteiswuerfel archtester 2021-04-18 22:27:10 UTC
Created attachment 700629 [details]
emerge --info
Comment 2 Herb Miller Jr. 2021-04-22 00:12:03 UTC
I'm able to reproduce this. Looks like it needs nspr.

$ qfile include/nspr/prtypes.h
dev-libs/nspr: /usr/include/nspr/prtypes.h
Comment 3 Herb Miller Jr. 2021-05-01 03:54:14 UTC
More correctly, nspr is installed, but the configure script is looking for it in the wrong place. I'm still working out why it's doing that. When I change -I/usr/include/nspr4 to -I/usr/include/nspr, it builds.

# grep nspr4 Makefile
CPPFLAGS =  -D_REENTRANT -I/usr/include/nspr4  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
NSS_LIBS = -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4

# grep NSS Makefile
NSS_CFLAGS = -I/usr/include/nss -I/usr/include/nspr
NSS_LIBS = -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4
OPENSSL_CFLAGS =
OPENSSL_LIBS =
Comment 4 Herb Miller Jr. 2021-05-04 13:28:53 UTC
The wrong header location is hardcoded in the configure script. It's looking for /usr/include/nspr4, but Gentoo installs the nspr headers in /usr/include/nspr.

Posed the question to upsteam as to how to resolve this: https://redmine.lighttpd.net/boards/3/topics/9759
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-04 13:33:45 UTC
(In reply to Herb Miller Jr. from comment #4)
> The wrong header location is hardcoded in the configure script. It's looking
> for /usr/include/nspr4, but Gentoo installs the nspr headers in
> /usr/include/nspr.
> 
> Posed the question to upsteam as to how to resolve this:
> https://redmine.lighttpd.net/boards/3/topics/9759

Sed it out with pkg-config output probably?
Comment 6 Herb Miller Jr. 2021-05-14 16:02:23 UTC
My plan is to include the patch to configure.ac from the forum thread, unless sed would be a preferable alternative.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-14 16:05:55 UTC
(In reply to Herb Miller Jr. from comment #6)
> My plan is to include the patch to configure.ac from the forum thread,
> unless sed would be a preferable alternative.

Use the last patch with PKG_CHECK_MODULES
Comment 8 Larry the Git Cow gentoo-dev 2021-07-03 15:46:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=386e519bafff8c44a4b04a0f658b6bf382b0c095

commit 386e519bafff8c44a4b04a0f658b6bf382b0c095
Author:     Herb Miller Jr <herb@hlmjr.com>
AuthorDate: 2021-05-20 21:05:19 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-07-03 15:42:19 +0000

    www-servers/lighttpd: Fix nspr header location
    
    Bug: https://bugs.gentoo.org/783936
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Herb Miller Jr. <herb@hlmjr.com>
    Closes: https://github.com/gentoo/gentoo/pull/20900
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../lighttpd/files/lighttpd-1.4.59-nspr-header.patch     | 16 ++++++++++++++++
 www-servers/lighttpd/lighttpd-1.4.59.ebuild              |  2 ++
 2 files changed, 18 insertions(+)
Comment 9 Joonas Niilola gentoo-dev 2021-07-03 15:47:22 UTC
FYI it looked to me like nspr was still being linked with 'nss' USE flag enabled. So you might want to add that as a dep.