[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#559405: opencryptoki: FTBFS on GNU/kFreeBSD



Package: opencryptoki
Version: 2.2.8+dfsg-3
Severity: important
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

Hi,

your package FTBFS on GNU/kFreeBSD due to some includes: linux/limits.h
isn't found, PATH_MAX is not defined, etc.

The attached prospective patch fixes that in several files, but isn't
sufficient to get the package built (hence my not tagging it “patch”).

The build log now ends with:
| gcc -DPACKAGE_NAME=\"openCryptoki\" -DPACKAGE_TARNAME=\"opencryptoki\" -DPACKAGE_VERSION=\"2.2.6\" -DPACKAGE_STRING=\"openCryptoki\ 2.2.6\" -DPACKAGE_BUGREPORT=\"opencryptoki-tech@lists.sourceforge.net\" -DPACKAGE=\"opencryptoki\" -DVERSION=\"2.2.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_GETCWD=1 -I.    -DSPINXPL -DPROGRAM_NAME=\"pkcsslotd-err.o\" -DNOODM -DNODAE -I../. -I../../include/pkcs11 -I../../include/pkcs11/stdll -g -O2 -O2 -DPKCS64				-DCONFIG_PATH=\"/var/lib/opencryptoki\"		-DSBIN_PATH=\"/usr/sbin\"			-DLIB_PATH=\"/usr/lib/opencryptoki\"	-D_XOPEN_SOURCE=500 -c -o pkcsslotd-err.o 
 `test -f 'err.c' || echo './'`err.c
| err.c:334: error: 'ECHRNG' undeclared here (not in a function)
| err.c:335: error: 'EL2NSYNC' undeclared here (not in a function)
| err.c:336: error: 'EL3HLT' undeclared here (not in a function)
| err.c:337: error: 'EL3RST' undeclared here (not in a function)
| err.c:338: error: 'ELNRNG' undeclared here (not in a function)
| err.c:339: error: 'EUNATCH' undeclared here (not in a function)
| err.c:340: error: 'ENOCSI' undeclared here (not in a function)
| err.c:341: error: 'EL2HLT' undeclared here (not in a function)
| err.c:372: error: 'ERESTART' undeclared here (not in a function)
| err.c:383: error: 'ENOSR' undeclared here (not in a function)
| err.c:384: error: 'ETIME' undeclared here (not in a function)
| err.c:387: error: 'ENODATA' undeclared here (not in a function)
| err.c:388: error: 'ENOSTR' undeclared here (not in a function)
| err.c:427: error: 'SIGPWR' undeclared here (not in a function)
| err.c:427: error: initializer element is not constant
| err.c:427: error: (near initialization for 'SignalInfo[25].Code')
| make[3]: *** [pkcsslotd-err.o] Error 1

Using some #ifdef around those variables would probably fix it, but I'm
not sure it's the way to go. Opening this bug to keep track of the
limits.h thingy at the very least.

Mraw,
KiBi.
--- a/usr/include/pkcs11/apictl.h
+++ b/usr/include/pkcs11/apictl.h
@@ -296,7 +296,11 @@
 
 
 #include <pkcs11types.h>
+#ifdef linux
 #include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
 #include <local_types.h>
 #include <stdll.h>
 #include <slotmgr.h>
--- a/usr/include/pkcs11/slotmgr.h
+++ b/usr/include/pkcs11/slotmgr.h
@@ -301,7 +301,11 @@
 
 
 #include <pkcs11types.h>
+#ifdef linux
 #include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
 #include <local_types.h>
 #include <pthread.h>
 
--- a/usr/include/pkcs11/stdll.h
+++ b/usr/include/pkcs11/stdll.h
@@ -302,7 +302,11 @@
 
 
 #include <pkcs11types.h>
+#ifdef linux
 #include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
 #include <local_types.h>
 #include <slotmgr.h>
 
--- a/usr/sbin/pkcsslotd/pkcsslotd.h
+++ b/usr/sbin/pkcsslotd/pkcsslotd.h
@@ -353,7 +353,11 @@
 #include <nl_types.h>
 
 #include <sys/ipc.h>
+#ifdef linux
 #include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
 #include <sys/shm.h>
 #include <sys/stat.h>
 #include <sys/types.h>

Reply to: