You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on Ubuntu 21.04 with SBCL 2.1.4 installed using Roswell, and c2ffi revision bfde21a005b7301019ece26eced1e7c12e37027e installed in my user's $PATH .
I'm trying to c-include Linux's netlink.h , which c2ffi seems to process to some degree when run by hand. Below you can find a console log of my attempt:
➜ antonis@nike ~ ros run
* (lisp-implementation-version)
"2.1.4"
* (ql:system-apropos "cl-autowrap")
#<SYSTEM cl-autowrap / cl-autowrap-20210411-git / quicklisp 2021-04-11>
#<SYSTEM cl-autowrap-test / cl-autowrap-20210411-git / quicklisp 2021-04-11>
#<SYSTEM cl-autowrap/libffi / cl-autowrap-20210411-git / quicklisp 2021-04-11>
#<SYSTEM cl-plus-c / cl-autowrap-20210411-git / quicklisp 2021-04-11>
* (ql:quickload "cl-autowrap")
To load "cl-autowrap":
Load 1 ASDF system:
cl-autowrap
; Loading "cl-autowrap"
.....
("cl-autowrap")
* (autowrap:c-include "/usr/include/linux/netlink.h" :trace-c2ffi t)
; Invoking: c2ffi /usr/include/linux/netlink.h -D null -M /tmp/user/1001/tmpAAURSO3.tmp -A x86_64-pc-linux-gnu
; Invoking: c2ffi /tmp/user/1001/tmp5GEXGEG7.tmp -o /home/antonis/netlink.x86_64-pc-linux-gnu.spec -A x86_64-pc-linux-gnu
debugger invoked on a UIOP/RUN-PROGRAM:SUBPROCESS-ERROR in thread
#<THREAD "main thread" RUNNING {1001550183}>:
Subprocess #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {1003042973}>
with command ("c2ffi" "/tmp/user/1001/tmp5GEXGEG7.tmp" "-o"
"/home/antonis/netlink.x86_64-pc-linux-gnu.spec" "-A"
"x86_64-pc-linux-gnu")
exited with error code 1
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] IGNORE-ERROR-STATUS
1: [ABORT ] Exit debugger, returning to top level.
(UIOP/RUN-PROGRAM::%CHECK-RESULT 1 :COMMAND ("c2ffi" "/tmp/user/1001/tmp5GEXGEG7.tmp" "-o" "/home/antonis/netlink.x86_64-pc-linux-gnu.spec" "-A" "x86_64-pc-linux-gnu") :PROCESS #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {1003042973}> :IGNORE-ERROR-STATUS NIL)
source: (CERROR "IGNORE-ERROR-STATUS" 'SUBPROCESS-ERROR :COMMAND COMMAND
:CODE EXIT-CODE :PROCESS PROCESS)
0] 1
* %
* ➜ antonis@nike ~ ls -l /tmp/user/1001/tmp5GEXGEG7.tmp
-rw-rw-r-- 1 antonis antonis 81 May 2 21:22 /tmp/user/1001/tmp5GEXGEG7.tmp
➜ antonis@nike ~ cat /tmp/user/1001/tmp5GEXGEG7.tmp
#include "/usr/include/linux/netlink.h"
#include "/tmp/user/1001/tmpAAURSO3.tmp"
➜ antonis@nike ~ cat /tmp/user/1001/tmpAAURSO3.tmp
const long __c2ffi_NLM_F_APPEND = NLM_F_APPEND;
const long __c2ffi_NLM_F_DUMP = NLM_F_DUMP;
const long __c2ffi_NLM_F_ATOMIC = NLM_F_ATOMIC;
const long __c2ffi_NLM_F_REPLACE = NLM_F_REPLACE;
const long __c2ffi_NLM_F_EXCL = NLM_F_EXCL;
const long __c2ffi_NLM_F_CREATE = NLM_F_CREATE;
const long __c2ffi_NLM_F_DUMP_FILTERED = NLM_F_DUMP_FILTERED;
const long __c2ffi_NLM_F_DUMP_INTR = NLM_F_DUMP_INTR;
const long __c2ffi_NLM_F_MATCH = NLM_F_MATCH;
const long __c2ffi_NLM_F_ROOT = NLM_F_ROOT;
const long __c2ffi_NLM_F_REQUEST = NLM_F_REQUEST;
const long __c2ffi_NLM_F_ACK = NLM_F_ACK;
const long __c2ffi_NLM_F_MULTI = NLM_F_MULTI;
const long __c2ffi_NLM_F_ECHO = NLM_F_ECHO;
const long __c2ffi_NETLINK_CRYPTO = NETLINK_CRYPTO;
const long __c2ffi_NETLINK_INET_DIAG = NETLINK_INET_DIAG;
const long __c2ffi_NETLINK_SMC = NETLINK_SMC;
const long __c2ffi_NETLINK_GENERIC = NETLINK_GENERIC;
const long __c2ffi_MAX_LINKS = MAX_LINKS;
const long __c2ffi_NETLINK_SCSITRANSPORT = NETLINK_SCSITRANSPORT;
const long __c2ffi_NETLINK_ECRYPTFS = NETLINK_ECRYPTFS;
const long __c2ffi_NETLINK_RDMA = NETLINK_RDMA;
const long __c2ffi_NETLINK_NETFILTER = NETLINK_NETFILTER;
const long __c2ffi_NETLINK_IP6_FW = NETLINK_IP6_FW;
const long __c2ffi_NETLINK_DNRTMSG = NETLINK_DNRTMSG;
const long __c2ffi_NETLINK_KOBJECT_UEVENT = NETLINK_KOBJECT_UEVENT;
const long __c2ffi_NETLINK_SELINUX = NETLINK_SELINUX;
const long __c2ffi_NETLINK_ISCSI = NETLINK_ISCSI;
const long __c2ffi_NETLINK_AUDIT = NETLINK_AUDIT;
const long __c2ffi_NETLINK_FIB_LOOKUP = NETLINK_FIB_LOOKUP;
const long __c2ffi_NETLINK_CONNECTOR = NETLINK_CONNECTOR;
const long __c2ffi_NETLINK_FIREWALL = NETLINK_FIREWALL;
const long __c2ffi_NETLINK_SOCK_DIAG = NETLINK_SOCK_DIAG;
const long __c2ffi_NETLINK_NFLOG = NETLINK_NFLOG;
const long __c2ffi_NETLINK_XFRM = NETLINK_XFRM;
const long __c2ffi___aligned_le64 = __aligned_le64;
const long __c2ffi___aligned_be64 = __aligned_be64;
const long __c2ffi___aligned_u64 = __aligned_u64;
const long __c2ffi_NETLINK_USERSOCK = NETLINK_USERSOCK;
const long __c2ffi_NETLINK_ROUTE = NETLINK_ROUTE;
const long __c2ffi___bitwise = __bitwise;
const long __c2ffi_NETLINK_UNUSED = NETLINK_UNUSED;
const long __c2ffi_NLA_F_NET_BYTEORDER = NLA_F_NET_BYTEORDER;
const long __c2ffi_NLA_TYPE_MASK = NLA_TYPE_MASK;
const long __c2ffi_NLA_ALIGNTO = NLA_ALIGNTO;
const long __c2ffi_NLA_HDRLEN = NLA_HDRLEN;
const long __c2ffi_NLA_F_NESTED = NLA_F_NESTED;
const long __c2ffi_NLM_F_NONREC = NLM_F_NONREC;
const long __c2ffi_NLMSG_OVERRUN = NLMSG_OVERRUN;
const long __c2ffi_NLMSG_MIN_TYPE = NLMSG_MIN_TYPE;
const long __c2ffi_NLMSG_ERROR = NLMSG_ERROR;
const long __c2ffi_NLMSG_DONE = NLMSG_DONE;
const long __c2ffi_NLMSG_NOOP = NLMSG_NOOP;
const long __c2ffi___kernel_old_uid_t = __kernel_old_uid_t;
const long __c2ffi_NLMSG_HDRLEN = NLMSG_HDRLEN;
const long __c2ffi___kernel_old_dev_t = __kernel_old_dev_t;
const unsigned long __c2ffi_NLMSG_ALIGNTO = NLMSG_ALIGNTO;
const long __c2ffi_NLM_F_CAPPED = NLM_F_CAPPED;
const long __c2ffi_NLM_F_ACK_TLVS = NLM_F_ACK_TLVS;
const long __c2ffi_NETLINK_NO_ENOBUFS = NETLINK_NO_ENOBUFS;
const long __c2ffi_NETLINK_TX_RING = NETLINK_TX_RING;
const long __c2ffi_NETLINK_RX_RING = NETLINK_RX_RING;
const long __c2ffi_NETLINK_PKTINFO = NETLINK_PKTINFO;
const long __c2ffi_NETLINK_BROADCAST_ERROR = NETLINK_BROADCAST_ERROR;
const long __c2ffi_NETLINK_ADD_MEMBERSHIP = NETLINK_ADD_MEMBERSHIP;
const long __c2ffi_NETLINK_DROP_MEMBERSHIP = NETLINK_DROP_MEMBERSHIP;
const long __c2ffi___BITS_PER_LONG = __BITS_PER_LONG;
const long __c2ffi__K_SS_MAXSIZE = _K_SS_MAXSIZE;
const long __c2ffi_NETLINK_GET_STRICT_CHK = NETLINK_GET_STRICT_CHK;
const long __c2ffi_NETLINK_EXT_ACK = NETLINK_EXT_ACK;
const long __c2ffi_NETLINK_LIST_MEMBERSHIPS = NETLINK_LIST_MEMBERSHIPS;
const long __c2ffi_NETLINK_CAP_ACK = NETLINK_CAP_ACK;
const long __c2ffi_NETLINK_LISTEN_ALL_NSID = NETLINK_LISTEN_ALL_NSID;
const long __c2ffi___FD_SETSIZE = __FD_SETSIZE;
const long __c2ffi_NET_MAJOR = NET_MAJOR;
const long __c2ffi_NL_MMAP_HDRLEN = NL_MMAP_HDRLEN;
const unsigned long __c2ffi_NL_MMAP_MSG_ALIGNMENT = NL_MMAP_MSG_ALIGNMENT;
const long __c2ffi___always_inline = __always_inline;
➜ antonis@nike ~ ls -l netlink.x86_64-pc-linux-gnu.spec
-rw-rw-r-- 1 antonis antonis 0 May 2 21:22 netlink.x86_64-pc-linux-gnu.spec
➜ antonis@nike ~ rm netlink.x86_64-pc-linux-gnu.spec
➜ antonis@nike ~ "c2ffi" "/tmp/user/1001/tmp5GEXGEG7.tmp" "-o" "/home/antonis/netlink.x86_64-pc-linux-gnu.spec" "-A" "x86_64-pc-linux-gnu"
warning: /tmp/user/1001/tmp5GEXGEG7.tmp: 'linker' input unused
error: unable to handle compilation, expected exactly one compiler job in '/tmp/user/1001/tmp5GEXGEG7.tmp'
➜ antonis@nike ~
The macro definition output file on a previous run had the following, different(!), content:
➜ antonis@nike ~ cat /tmp/user/1001/tmp8V3J6PE9.tmp
const long __c2ffi___kernel_old_uid_t = __kernel_old_uid_t;
const long __c2ffi___kernel_old_dev_t = __kernel_old_dev_t;
const long __c2ffi__K_SS_MAXSIZE = _K_SS_MAXSIZE;
const long __c2ffi___BITS_PER_LONG = __BITS_PER_LONG;
const long __c2ffi___always_inline = __always_inline;
const long __c2ffi___FD_SETSIZE = __FD_SETSIZE;
const long __c2ffi___bitwise = __bitwise;
const long __c2ffi___aligned_le64 = __aligned_le64;
const long __c2ffi___aligned_be64 = __aligned_be64;
const long __c2ffi___aligned_u64 = __aligned_u64;
const long __c2ffi_NETLINK_USERSOCK = NETLINK_USERSOCK;
const long __c2ffi_NETLINK_UNUSED = NETLINK_UNUSED;
const long __c2ffi_NETLINK_ROUTE = NETLINK_ROUTE;
const long __c2ffi_NLMSG_HDRLEN = NLMSG_HDRLEN;
const unsigned long __c2ffi_NLMSG_ALIGNTO = NLMSG_ALIGNTO;
const long __c2ffi_NLM_F_CAPPED = NLM_F_CAPPED;
const long __c2ffi_NLM_F_ACK_TLVS = NLM_F_ACK_TLVS;
const long __c2ffi_NLMSG_OVERRUN = NLMSG_OVERRUN;
const long __c2ffi_NLMSG_MIN_TYPE = NLMSG_MIN_TYPE;
const long __c2ffi_NLMSG_ERROR = NLMSG_ERROR;
const long __c2ffi_NLMSG_DONE = NLMSG_DONE;
const long __c2ffi_NLMSG_NOOP = NLMSG_NOOP;
const long __c2ffi_NLM_F_DUMP = NLM_F_DUMP;
const long __c2ffi_NLM_F_ATOMIC = NLM_F_ATOMIC;
const long __c2ffi_NLM_F_REPLACE = NLM_F_REPLACE;
const long __c2ffi_NLM_F_CREATE = NLM_F_CREATE;
const long __c2ffi_NLM_F_EXCL = NLM_F_EXCL;
const long __c2ffi_NLM_F_DUMP_FILTERED = NLM_F_DUMP_FILTERED;
const long __c2ffi_NLM_F_DUMP_INTR = NLM_F_DUMP_INTR;
const long __c2ffi_NLM_F_MATCH = NLM_F_MATCH;
const long __c2ffi_NLM_F_ROOT = NLM_F_ROOT;
const long __c2ffi_NETLINK_NO_ENOBUFS = NETLINK_NO_ENOBUFS;
const long __c2ffi_NETLINK_TX_RING = NETLINK_TX_RING;
const long __c2ffi_NETLINK_PKTINFO = NETLINK_PKTINFO;
const long __c2ffi_NETLINK_BROADCAST_ERROR = NETLINK_BROADCAST_ERROR;
const long __c2ffi_NETLINK_ADD_MEMBERSHIP = NETLINK_ADD_MEMBERSHIP;
const long __c2ffi_NETLINK_DROP_MEMBERSHIP = NETLINK_DROP_MEMBERSHIP;
const long __c2ffi_NLM_F_APPEND = NLM_F_APPEND;
const long __c2ffi_NETLINK_RX_RING = NETLINK_RX_RING;
const long __c2ffi_NETLINK_GET_STRICT_CHK = NETLINK_GET_STRICT_CHK;
const long __c2ffi_NETLINK_CRYPTO = NETLINK_CRYPTO;
const long __c2ffi_NETLINK_EXT_ACK = NETLINK_EXT_ACK;
const long __c2ffi_NETLINK_LIST_MEMBERSHIPS = NETLINK_LIST_MEMBERSHIPS;
const long __c2ffi_NETLINK_SMC = NETLINK_SMC;
const long __c2ffi_NETLINK_CAP_ACK = NETLINK_CAP_ACK;
const long __c2ffi_NETLINK_INET_DIAG = NETLINK_INET_DIAG;
const long __c2ffi_MAX_LINKS = MAX_LINKS;
const long __c2ffi_NETLINK_LISTEN_ALL_NSID = NETLINK_LISTEN_ALL_NSID;
const long __c2ffi_NLM_F_REQUEST = NLM_F_REQUEST;
const long __c2ffi_NLM_F_ACK = NLM_F_ACK;
const long __c2ffi_NLM_F_MULTI = NLM_F_MULTI;
const long __c2ffi_NLM_F_ECHO = NLM_F_ECHO;
const long __c2ffi_NETLINK_ISCSI = NETLINK_ISCSI;
const long __c2ffi_NETLINK_AUDIT = NETLINK_AUDIT;
const long __c2ffi_NETLINK_SELINUX = NETLINK_SELINUX;
const long __c2ffi_NETLINK_FIB_LOOKUP = NETLINK_FIB_LOOKUP;
const long __c2ffi_NETLINK_CONNECTOR = NETLINK_CONNECTOR;
const long __c2ffi_NETLINK_FIREWALL = NETLINK_FIREWALL;
const long __c2ffi_NETLINK_SOCK_DIAG = NETLINK_SOCK_DIAG;
const unsigned long __c2ffi_NL_MMAP_MSG_ALIGNMENT = NL_MMAP_MSG_ALIGNMENT;
const long __c2ffi_NETLINK_NFLOG = NETLINK_NFLOG;
const long __c2ffi_NETLINK_GENERIC = NETLINK_GENERIC;
const long __c2ffi_NETLINK_XFRM = NETLINK_XFRM;
const long __c2ffi_NETLINK_SCSITRANSPORT = NETLINK_SCSITRANSPORT;
const long __c2ffi_NETLINK_ECRYPTFS = NETLINK_ECRYPTFS;
const long __c2ffi_NETLINK_RDMA = NETLINK_RDMA;
const long __c2ffi_NETLINK_NETFILTER = NETLINK_NETFILTER;
const long __c2ffi_NET_MAJOR = NET_MAJOR;
const long __c2ffi_NETLINK_IP6_FW = NETLINK_IP6_FW;
const long __c2ffi_NL_MMAP_HDRLEN = NL_MMAP_HDRLEN;
const long __c2ffi_NETLINK_DNRTMSG = NETLINK_DNRTMSG;
const long __c2ffi_NETLINK_KOBJECT_UEVENT = NETLINK_KOBJECT_UEVENT;
const long __c2ffi_NLA_F_NET_BYTEORDER = NLA_F_NET_BYTEORDER;
const long __c2ffi_NLA_TYPE_MASK = NLA_TYPE_MASK;
const long __c2ffi_NLA_ALIGNTO = NLA_ALIGNTO;
const long __c2ffi_NLA_HDRLEN = NLA_HDRLEN;
const long __c2ffi_NLA_F_NESTED = NLA_F_NESTED;
const long __c2ffi_NLM_F_NONREC = NLM_F_NONREC;
The netlink.h file belongs to package linux-libc-dev:amd64 5.11.0-16.17 .
Any assistance would be very welcome!
The text was updated successfully, but these errors were encountered:
Hello and thank you for your work!
Apologies for the long report.
I'm on Ubuntu 21.04 with SBCL 2.1.4 installed using Roswell, and c2ffi revision bfde21a005b7301019ece26eced1e7c12e37027e installed in my user's $PATH .
I'm trying to c-include Linux's netlink.h , which c2ffi seems to process to some degree when run by hand. Below you can find a console log of my attempt:
The macro definition output file on a previous run had the following, different(!), content:
The netlink.h file belongs to package linux-libc-dev:amd64 5.11.0-16.17 .
Any assistance would be very welcome!
The text was updated successfully, but these errors were encountered: