Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282141 - net-dialup/fcdsl2-0.1-r1: Does not compile with modern kernel
Summary: net-dialup/fcdsl2-0.1-r1: Does not compile with modern kernel
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Stefan Briesenick (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-20 19:50 UTC by Tomek
Modified: 2010-07-21 00:47 UTC (History)
2 users (show)

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


Attachments
Renames method calls find_task_by_pid() to find_task_by_vpid() (fcdsl2-0.1-r2.ebuild,1.74 KB, patch)
2009-09-15 16:01 UTC, Tomek
Details | Diff
ebuild with some adaption to 2.6.32 and pipe behavior (fcdsl2-0.1-r3.ebuild,1.99 KB, text/plain)
2010-02-11 00:59 UTC, Michael Weber (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomek 2009-08-20 19:50:01 UTC
>>> Emerging (1 of 1) net-dialup/fcdsl2-0.1-r1
 * fcdsl2-0.1-0.src.rpm RMD160 SHA1 SHA256 size ;-) ...                                                        [ ok ]
 * checking ebuild checksums ;-) ...                                                                           [ ok ]
 * checking auxfile checksums ;-) ...                                                                          [ ok ]
 * checking miscfile checksums ;-) ...                                                                         [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.30-gentoo-r5
>>> Unpacking source...
>>> Unpacking fcdsl2-suse93-64bit-3.11-07.tar.gz to /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work
 * Applying fritz-config.diff ...                                                                               [ ok ]
 * Applying fritz_pci.diff ...                                                                                  [ ok ]
 * Applying fritz_irq.diff ...                                                                                  [ ok ]
 * Applying fritz_driver_init.diff ...                                                                          [ ok ]
 * Applying fcdsl2_kernel-2.6.24.diff ...                                                                       [ ok ]
 * Converting src/Makefile to use M= instead of SUBDIRS= ...                                                    [ ok ]
 * Localize symbols in fcdsl2-lib.o ...
>>> Source unpacked in /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work
>>> Compiling source in /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz ...
 * Preparing fcdsl2 module
make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= KDIR=/usr/src/linux LIBDIR=/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src all 
make -C /usr/src/linux M=/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src modules
make[1]: Entering directory `/usr/src/linux-2.6.30-gentoo-r5'
  CC [M]  /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/main.o
  CC [M]  /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.o
  CC [M]  /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/tools.o
  CC [M]  /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/devif.o
  CC [M]  /var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/tables.o
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c: In function 'exit_debug_buffer':
/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.c:421: error: implicit declaration of function 'find_task_by_pid'
/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:1440: warning: comparison between pointer and integer
make[2]: *** [/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.30-gentoo-r5'
make: *** [fcdsl2.o] Error 2
 * 
 * ERROR: net-dialup/fcdsl2-0.1-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3435:  Called linux-mod_src_compile
 *             environment, line 2613:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 						CROSS_COMPILE=${CHOST}- 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 					${BUILD_FIXES} 						${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  KDIR=/usr/src/linux LIBDIR=/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src all
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/temp/environment'.
 * 

>>> Failed to emerge net-dialup/fcdsl2-0.1-r1, Log file:

>>>  '/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/temp/build.log'

 * Messages for package net-dialup/fcdsl2-0.1-r1:

 * 
 * ERROR: net-dialup/fcdsl2-0.1-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3435:  Called linux-mod_src_compile
 *             environment, line 2613:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 						CROSS_COMPILE=${CHOST}- 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 					${BUILD_FIXES} 						${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  KDIR=/usr/src/linux LIBDIR=/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/work/fritz/src all
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dialup/fcdsl2-0.1-r1/temp/environment'.
 * 


Reproducible: Always
Comment 1 Tomek 2009-09-15 16:01:01 UTC
Created attachment 204211 [details, diff]
Renames method calls find_task_by_pid() to find_task_by_vpid()

The uploaded ebuld 'fcdsl2-0.1-r2.ebuild' works on my machine and may be used as template.

See therefore also discussion in forum: 
http://forums.gentoo.org/viewtopic-t-789598.html
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-02-10 14:47:06 UTC
Hi Tomek,

the ebuild works here, too. I've removed the content of the $Header and changed the indentation from spaces to tabs. I've added it to http://svn.xmw.de/gentoo-overlay/. But the ebuild writes

 * Updating module dependencies for 2.6.32-gentoo-r4-pandora.1 ...
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWBlockOpen
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWFreeBuffer
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWRxBuffer
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWBlockClose
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWAllocBuffer
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWStart
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWExchangeDeviceRequirements
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWStop
WARNING: //lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko needs unknown symbol OSHWTxBuffer                                                                          [ ok ]

The moment I load the module, I see an error
pandora ~ # modprobe fcdsl2 
FATAL: Error inserting fcdsl2 (/lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko): Unknown symbol in module, or unknown parameter (see dmesg)

with kernel log reading

[  545.740725] fcdsl2: Unknown symbol OSHWBlockOpen
[  545.740893] fcdsl2: Unknown symbol OSHWFreeBuffer
[  545.741401] fcdsl2: Unknown symbol OSHWRxBuffer
[  545.741567] fcdsl2: Unknown symbol OSHWBlockClose
[  545.741733] fcdsl2: Unknown symbol OSHWAllocBuffer
[  545.741896] fcdsl2: Unknown symbol OSHWStart
[  545.742360] fcdsl2: Unknown symbol OSHWExchangeDeviceRequirements
[  545.742528] fcdsl2: Unknown symbol OSHWStop
[  545.742694] fcdsl2: Unknown symbol OSHWTxBuffer

pandora fcdsl2-0.1-r2 # grep -r OSHW /var/tmp/portage/net-dialup/fcdsl2-0.1-r2
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWTxBuffer" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWStop" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWExchangeDeviceRequirements" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWStart" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWAllocBuffer" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWBlockClose" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWRxBuffer" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWFreeBuffer" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/temp/build.log:WARNING: "OSHWBlockOpen" [/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko] undefined!
Binary file /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/lib/fcdsl2-lib.o matches
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWBlockOpen (unsigned, hw_block_handle *);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr void OSHWBlockClose (hw_block_handle);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWStart (
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr void OSHWStop (hw_block_handle);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr hw_buffer_descriptor_p OSHWAllocBuffer (hw_block_handle, unsigned);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr void OSHWFreeBuffer (hw_buffer_descriptor_p);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWGetMaxBlockSize (hw_block_handle);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWGetMaxConcurrentRxBlocks (hw_block_handle);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWGetMaxConcurrentTxBlocks (hw_block_handle);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr void * OSHWExchangeDeviceRequirements (hw_block_handle, void *);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWTxBuffer (
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWRxBuffer (
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWCancelRx (hw_block_handle);
/var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h:extern __attr unsigned OSHWCancelTx (hw_block_handle);
Binary file /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.o matches
Binary file /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2.ko matches
Binary file /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/fcdsl2-lib.o matches
Binary file /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/fcdsl21.ko matches
Binary file /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/image/lib/modules/2.6.32-gentoo-r4-pandora.1/net/fcdsl2.ko matches

The Symbols were defined inside /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.h with /var/tmp/portage/net-dialup/fcdsl2-0.1-r2/work/fritz/src/devif.c to be empty (0 Bytes). The devif.c supplied by fcdslusba-0.1-r1 ebuild has 17kB, but does not work by moving to the fcdsl2 location. 

Do you have any clue? I have to postpone my efforts due to lack of time at this moment. 

Michael
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-02-11 00:59:19 UTC
Created attachment 219175 [details]
ebuild with some adaption to 2.6.32 and pipe behavior

n.b. sed ... < "file" > "file" does not work like inplace.
In rare cases with a friendly sheduler and files smaller than the buffer size it will succeed, but in __GENERAL__, this leaves file just empty.
sed -i ... "file" does the right thing.

Next, capi_ctr_reseted war renamed to capi_ctr_down. 
find_task_by_pid(.) was move to find_task_by_vpid(.), which is now something 
like find_pis_ns(., 0), but this works only with MODULE_LICENSE("GPL"); which is set, too.

The newest version is from 11_1, not 10_3 in http://opensuse.foehr-it.de/rpms/11_1/src/${P}-0.src.rpm.

Now I can load this module w/o crash or error, but I've just discovered, that I've the v1 card, not the v2 ... I'll add my patch later.

I've learned that there is a direct download from AVM with version 3.77 from http://download.avm.de/cardware/fritzcrd.dsl_v20/linux_64bit/suse.10.0/fcdsl2-suse10.0-64bit-3.11-07.tar.gz for kernel circa 2.6.30. That could be a cleaner starting point for a gentoo ebuild. Maybe more to come.
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2010-07-21 00:47:04 UTC
Abandoned upstream. Won't work with current kernels. Closed Source.