Date: Sun, 18 Sep 2011 09:32:41 GMT From: Ivan Klymenko <fidaj@ukr.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/160799: [patch] emulators/rtc AND 9.0-BETA2 >= r225618 rtc.ko: Exec format error Message-ID: <201109180932.p8I9Wfj3052898@red.freebsd.org> Resent-Message-ID: <201109180940.p8I9e6lM015191@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 160799 >Category: ports >Synopsis: [patch] emulators/rtc AND 9.0-BETA2 >= r225618 rtc.ko: Exec format error >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 18 09:40:06 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Ivan Klymenko >Release: FreeBSD 9.0-BETA2 r225642 amd64 >Organization: individual >Environment: >Description: After updating /usr/src to svn r225618 module rtc.ko has exec format error: .. rtclink_elf_obj: symbol ioctl undefined linker_load_file: Unsupported file type kldload: can't load /usr/local/modules/rtc.ko: Exec format error .. and the port emulators/rtc fails to compile: .. cc -O2 -pipe -march=core2 -DCDEV_MAJOR_=202 -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/ports_build/usr/ports/emulators/rtc/work/files -I/sys -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c rtc_linux.c distcc[7034] ERROR: compile /usr/.ccache/tmp/rtc_linux.tmp.nonamehost.7031.i on localhost failed cc1: warnings being treated as errors rtc_linux.c: In function 'linux_ioctl_rtc': rtc_linux.c:74: warning: implicit declaration of function 'ioctl' rtc_linux.c:74: warning: nested extern declaration of 'ioctl' [-Wnested-externs] *** Error code 1 1 error ===> Compilation failed unexpectedly. You have chosen to use multiple make jobs (parallelization) for all ports. This port was not tested for this setting. Please remove FORCE_MAKE_JOBS and retry the build before reporting the failure to the maintainer. *** Error code 1 Stop in /usr/ports/emulators/rtc. .. >How-To-Repeat: kldload rtc.ko AND cd /usr/ports/emulators/rtc && make reinstall clean >Fix: need to change the name of the function in rtc_linux.c: <ioctl> -> <sys_ioctl> or add the following patch: Patch attached with submission follows: --- ./rtc_linux.c.orig 2011-09-18 12:08:17.000000000 +0300 +++ ./rtc_linux.c 2011-09-18 12:08:28.000000000 +0300 @@ -71,10 +71,10 @@ switch (args->cmd & 0xffff) { case LINUX_RTC_PIE_ON: args->cmd=RTCIO_PIE_ON; - return ioctl(p, (struct ioctl_args*)args); + return sys_ioctl(p, (struct ioctl_args*)args); case LINUX_RTC_IRQP_SET: args->cmd=RTCIO_IRQP_SET; - return ioctl(p, (struct ioctl_args*)args); + return sys_ioctl(p, (struct ioctl_args*)args); } return (ENOIOCTL); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109180932.p8I9Wfj3052898>