Bug 160799 - [patch] emulators/rtc AND 9.0-BETA2 >= r225618 rtc.ko: Exec format error
Summary: [patch] emulators/rtc AND 9.0-BETA2 >= r225618 rtc.ko: Exec format error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-18 10:40 UTC by Ivan Klymenko
Modified: 2011-09-18 21:40 UTC (History)
0 users

See Also:


Attachments
file.diff (496 bytes, patch)
2011-09-18 10:40 UTC, Ivan Klymenko
no flags Details | Diff
patch-emulators__rtc.txt (667 bytes, patch)
2011-09-18 18:09 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Klymenko 2011-09-18 10:40:06 UTC
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.
..

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:
How-To-Repeat: kldload rtc.ko

AND

cd /usr/ports/emulators/rtc && make reinstall clean
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-09-18 10:40:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->emulation

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Rainer Hurling freebsd_committer freebsd_triage 2011-09-18 18:09:35 UTC
As kmacy@ suggested on #bsdports, the version number should be repected.
Comment 3 Ivan Klymenko 2011-09-18 20:51:08 UTC
=D0=92 Sun, 18 Sep 2011 19:07:17 +0200
Rainer Hurling <Rainer.Hurling@rhurlin.de> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:

> As kmacy@ suggested on #bsdports, the version number should be
> repected.

That's perfect.

Thanks!
Comment 4 Ivan Klymenko 2011-09-18 20:52:35 UTC
=D0=92 Sun, 18 Sep 2011 19:09:35 +0200
Rainer Hurling <rhurlin@gwdg.de> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:

> As kmacy@ suggested on #bsdports, the version number should be
> repected.
>=20

That's perfect.

Thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-09-18 21:31:19 UTC
bsam        2011-09-18 20:31:05 UTC

  FreeBSD ports repository

  Modified files:
    emulators/rtc/files  rtc_linux.c 
  Log:
  Fix building for OSVERSION >= 900044.
  
  PR:             ports/160799
  Submitted by:   Ivan Klymenko <fidaj@ukr.net>
  Patch by:       Rainer Hurling <rhurlin@gwdg.de>
  
  Revision  Changes    Path
  1.5       +9 -1      ports/emulators/rtc/files/rtc_linux.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Boris Samorodov freebsd_committer freebsd_triage 2011-09-18 21:31:25 UTC
State Changed
From-To: open->closed

The port is fixed, thanks!