Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202385 - net-dialup/fritzcapi doesn't compile on 2.6.24 due to no longer available old constants (trivial to fix)
Summary: net-dialup/fritzcapi doesn't compile on 2.6.24 due to no longer available old...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: kernel-2.6.24
  Show dependency tree
 
Reported: 2007-12-15 13:48 UTC by sECuRE
Modified: 2010-07-21 23:02 UTC (History)
7 users (show)

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


Attachments
proposed patch (fritzcapi-2.6.24.patch,574 bytes, patch)
2007-12-15 13:49 UTC, sECuRE
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sECuRE 2007-12-15 13:48:52 UTC
See summary, patch attached. This is a trivial issue.

Reproducible: Always

Steps to Reproduce:
Comment 1 sECuRE 2007-12-15 13:49:32 UTC
Created attachment 138542 [details, diff]
proposed patch
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2007-12-15 23:21:03 UTC
hmm, really trivial. But it would be better to use "#if kernelversion >= xyz" statements around the changes. So this patch can be applied for all kernel versions...
Comment 3 sECuRE 2007-12-15 23:37:56 UTC
(In reply to comment #2)
> hmm, really trivial. But it would be better to use "#if kernelversion >= xyz"
> statements around the changes. So this patch can be applied for all kernel
> versions...
Yes, you could also do this in the ebuild. However, since these constants exist since 2.6.18 (at least, that's where i saw them in a quick google search), it should be safe to integrate the patch without version checks (if I'm not wrong concerning the way gentoo handles kernel versions...)
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2007-12-15 23:51:22 UTC
well, #if's are a good idea in general. But if these changes work at 2.6.18, then we can use >= 2.6.18. ;-)
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-06 02:17:37 UTC
I found a new and better source for AVM drivers. Now all drivers are splitted in their own ebuilds. So feel free and try them. They all build at least fine with kernel-2.6.23, though I can't test them all due to lack of corresponding hardware. ;)
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-26 23:23:38 UTC
netdialup/fcclassic ebuild compiles fine on kernel 2.6.24.
Comment 7 Fred Röhner 2008-01-28 21:06:36 UTC
compiles fine yes - but is not functional due to the 'string.h' problem!
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-29 21:00:52 UTC
I have fixed this already in my local overlay. But I want to fix other issues with kernel 2.6.24 for *all* splitted ebuilds, then I commit it alltogether. I'm working on it...
Comment 9 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-30 01:43:32 UTC
ok, string.h issue should be fixed now in -r1. furthermore, all split-ebuilds should compile fine on kernel 2.6.24. Please test! thanks!
Comment 10 Volkmar Glauche 2008-01-31 08:05:59 UTC
(In reply to comment #9)
> ok, string.h issue should be fixed now in -r1. furthermore, all split-ebuilds
> should compile fine on kernel 2.6.24. Please test! thanks!
> 

net-dialup/fcpcmcia split ebuild compiles cleanly and works fine for me on 2.6.24/x86-32bit.
Comment 11 Fred Röhner 2008-02-01 18:10:39 UTC
netdialup/fcclassic now working again (2.6.24/x86)! Thank you - well done!
Comment 12 Ilja R 2008-02-05 16:39:42 UTC
Hmm, the new fcdsl2 does not compile with kernel 2.6.23.14. The compiler errors are as follows:

/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c:121: error: conflicting types for ‘thread_sync’
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c:119: error: previous definition of ‘thread_sync’ was here
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c: In function ‘sched_thread’:
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c:1411: warning: passing argument 1 of ‘complete’ from incompatible pointer type
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c: In function ‘kill_thread’:
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c:1448: warning: passing argument 1 of ‘wait_for_completion’ from incompatible pointer type


My emerge --info

Portage 2.1.3.19 (default-linux/x86/2007.0/server, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23.14 i686)
=================================================================
System uname: 2.6.23.14 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Tue, 05 Feb 2008 01:46:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/httpd/htdocs /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/make.globals /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache digest distlocks fixpackages metadata-transfer notitles sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.uni-c.dk/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.mneisen.org/gentoo http://gentoo.mneisen.org/ http://pandemonium.tiscali.de/pub/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sipx /usr/local/portage /usr/portage/local/layman/voip /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="aac acl acpi alsa amd apache2 apm asterisk async cap capi caps catalogs ccache cddb clamav cpufreq crypt css cups curl device-mapper dhcp directfb divx dvd fam fastcgi fbcon gd imap json ldap lm_sensors mbox md5sum mmap mmx mp3 mpm-worker mysql ncurses nfs nis nls no-htdocs nomotif nptl nptlonly oav ogg pam perl plotutils pmu png pnm postfix ppds pppd python quotas reiser4 reiserfs samba sasl sensord slp smp snmp socks5 softfax spell sse sse2 ssl subversion sysfs syslog t1lib tcpd tcpwrapper threads truetype type1 unicode usb v4l v4l2 vorbis webdav wifi winbind wmf x86 xattr xinetd xml" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1      emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m   maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FCDSL_CARDS="fcdsl2" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" MISDN_CARDS="avmfritz" USERLAND="GNU" VIDEO_CARDS="vesa nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 13 Stefan Briesenick (RETIRED) gentoo-dev 2008-02-05 17:38:33 UTC
strange! net-dialup/fcdsl2-0.1-r1 compiles fine with kernel 2.6.24, though I can't test the driver due to the lack of hardware.
Comment 14 Ilja R 2008-02-06 13:36:55 UTC
I believe that. My suggestion is to patch fritz/src/driver.c to read as follows:

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
static DECLARE_MUTEX_LOCKED(thread_sync);
#else
static DECLARE_COMPLETION(thread_sync); /* New DECLARE, <arnd.feldmueller@web.de> */
#endif

However, that is just syntactic tweaking without understanding the code...
Comment 15 Ilja R 2008-02-06 13:37:53 UTC
Also, please note, that I am using kernel 2.6._23_!
Comment 16 Ilja R 2008-02-06 13:51:30 UTC
That's in line 119 I believe... Sorry for the confusion.

(In reply to comment #14)
> I believe that. My suggestion is to patch fritz/src/driver.c to read as
> follows:
> 
> #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
> static DECLARE_MUTEX_LOCKED(thread_sync);
> #else
> static DECLARE_COMPLETION(thread_sync); /* New DECLARE,
> <arnd.feldmueller@web.de> */
> #endif
> 
> However, that is just syntactic tweaking without understanding the code...
> 

Comment 17 Daniel Drake (RETIRED) gentoo-dev 2008-03-13 15:45:15 UTC
patch is wrong

I suggest removing the #if'd out parts so that just the new completion-based API is present. This API is not new so this change should work for all recent kernel releases.
Comment 18 Stefan Briesenick (RETIRED) gentoo-dev 2008-03-18 00:11:42 UTC
ok, i will fix it this way.
Comment 19 Quincy 2008-04-15 12:25:15 UTC
When will these patches go into "regulary" portage?
Comment 20 Manfred Knick 2008-04-19 07:13:35 UTC
(In reply to comment #5)
> I found a new and better source for AVM drivers. Now all drivers are splitted
> in their own ebuilds. So feel free and try them. They all build at least fine
> with kernel-2.6.23, though I can't test them all due to lack of corresponding
> hardware. ;)
> 

I recognized that the ebuild relies on SUSE .rpm's like
ftp://ftp.suse.com/pub/suse/i386/10.1/SUSE-Linux10.1-Beta3-Extra/suse/x86_64/km_${P/2.6./2.6-}.x86_64.rpm
whereas AVM supplies e.g.
http://www.avm.de/files/cardware/fritzcrd.pci/linux_64bit/suse.10.0/fcpci-suse10.0-64bit-3.11-07.tar.gz
etc. directly.

Can you point me to a hint why? Thanks in advance!

Comment 21 Stefan Briesenick (RETIRED) gentoo-dev 2008-04-21 00:28:12 UTC
AVM sources are not compatible with newer kernels. You need patches. And these patches are (already) included in the SuSE-RPMs.
Comment 22 Manfred Knick 2008-04-21 06:31:14 UTC
(In reply to comment #21)
> AVM sources are not compatible with newer kernels

Thanks a lot!

And, BTW:
In between I can confirm the change being working on the following system:


ASUS M2N-SLI Deluxe with AMD X2 5000+ and 2 x 1GB RAM
AVM Fritz!Card PCI

# emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.6.1-r0, 2.6.24-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
Timestamp of tree: Sun, 20 Apr 2008 05:45:01 +0000
ccache version 2.4 [disabled]
...
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe "
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-march=k8 -O2 -pipe "
Comment 23 Christian Parpart (RETIRED) gentoo-dev 2008-05-20 15:32:27 UTC
well, i've tested this ebuild with the attached patch, however, it seems that someone is (or WAS atleast) working on this.


is that still so, or can i take it over?
Comment 24 Stefan Briesenick (RETIRED) gentoo-dev 2008-05-26 21:36:55 UTC
@christian: if you want, then take this beast. It was genstef's baby in the past. I just reworked it, since the old ebuild was completely broken on current kernels. ;-)
Comment 25 Quincy 2008-08-12 09:43:00 UTC
I just have to ask again: Is there any work going on to get this into portage? We now arrived at a stable 2.6.25 kernel and i have to run machines with fritzcard on 2.6.23 kernels, because there is no new version in portage...
Comment 26 Sven 2008-08-12 11:01:34 UTC
(In reply to comment #25)
> I just have to ask again: Is there any work going on to get this into portage?
> We now arrived at a stable 2.6.25 kernel and i have to run machines with
> fritzcard on 2.6.23 kernels, because there is no new version in portage...

I'm using net-dialup/fcpci-0.1-r1 with kernel 2.6.26.1
Comment 27 Quincy 2009-01-14 21:53:56 UTC
I'm now running fcpci-0.1-r1 on 4 different machines with FritzCard PCI without any problem. If there is no progress in this bug, i would recommend to stabilize fcpci so FritzCard PCI users have a working alternative solution.
Comment 28 Stefan Briesenick (RETIRED) gentoo-dev 2010-07-21 23:02:30 UTC
upstream dead, closed source, doesn't work with current kernels -> masked.