Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430484 - sys-apps/systemd-187 fails to generate a correct set of syscalls - In file included from src/core/syscall-list.c:31:0: src/core/syscall-to-name.h:6:2: error: ‘__NR_connect’ undeclared here (not in a function)
Summary: sys-apps/systemd-187 fails to generate a correct set of syscalls - In file in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-08-08 18:29 UTC by crabbed halo ablution
Modified: 2012-08-11 00:19 UTC (History)
1 user (show)

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


Attachments
fix abusive autotools behaviour (systemd-187-multiarch-fix.patch,1.32 KB, patch)
2012-08-08 18:31 UTC, crabbed halo ablution
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crabbed halo ablution 2012-08-08 18:29:58 UTC
systemd-187 does some smartypants m4-hackery to extract the valid syscalls from syscall.h. Since this file is arch-specific and since the output from gcc -E (CPP) is dependent on the CFLAGS, it should use standard autotools behavior to generate its extract. Unfortunately, it does no such thing and just calls cpp, which works untill you have to crosscompile or compile for a sub-arch such as x86 on amd64 (multilib-portage). In that case, it just blows up in your face because different syscalls are available for the two architectures:
[...]
  GEN    src/core/load-fragment-gperf.c
  GEN    src/core/load-fragment-gperf-nulstr.c
  CC     src/udev/libudev_core_la-udev-event.lo
  CC     src/udev/libudev_core_la-udev-watch.lo
  CC     src/udev/libudev_core_la-udev-node.lo
  CC     src/udev/libudev_core_la-udev-rules.lo
In file included from src/core/syscall-list.c:31:0:
src/core/syscall-to-name.h:6:2: error: ‘__NR_connect’ undeclared here (not in a function)
src/core/syscall-to-name.h:6:1: error: array index in initializer not of integer type
src/core/syscall-to-name.h:6:1: error: (near initialization for ‘syscall_names’)
src/core/syscall-to-name.h:21:2: error: ‘__NR_semop’ undeclared here (not in a function)
src/core/syscall-to-name.h:21:1: error: array index in initializer not of integer type
src/core/syscall-to-name.h:21:1: error: (near initialization for ‘syscall_names’)
src/core/syscall-to-name.h:23:2: error: ‘__NR_epoll_ctl_old’ undeclared here (not in a function)
src/core/syscall-to-name.h:23:1: error: array index in initializer not of integer type
src/core/syscall-to-name.h:23:1: error: (near initialization for ‘syscall_names’)
src/core/syscall-to-name.h:25:2: error: ‘__NR_shmat’ undeclared here (not in a function)
src/core/syscall-to-name.h:25:1: error: array index in initializer not of integer type
src/core/syscall-to-name.h:25:1: error: (near initialization for ‘syscall_names’)
src/core/syscall-to-name.h:30:2: error: ‘__NR_shmdt’ undeclared here (not in a function)
src/core/syscall-to-name.h:30:1: error: array index in initializer not of integer type
src/core/syscall-to-name.h:30:1: error: (near initialization for ‘syscall_names’)
src/core/syscall-to-name.h:52:2: error: ‘__NR_semctl’ undeclared here (not in a function)
src/core/syscall-to-name.h:52:1: error: array index in initializer not of integer type
src/core/syscall-to-name.h:52:1: error: (near initialization for ‘syscall_names’)
[...]
Comment 1 crabbed halo ablution 2012-08-08 18:31:57 UTC
Created attachment 320738 [details, diff]
fix abusive autotools behaviour

eautoreconf needed after applying this patch
Comment 2 crabbed halo ablution 2012-08-08 18:53:28 UTC
Filed upstream bug. See URL
Comment 3 crabbed halo ablution 2012-08-09 18:54:57 UTC
This should be fixed with systemd-188 which was released 18 hours ago. Close this bug when you've bumped.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-08-11 00:19:00 UTC
(In reply to comment #3)
> This should be fixed with systemd-188 which was released 18 hours ago. Close
> this bug when you've bumped.

-188 in the tree. Feel free to give it a try but it may be scary.