FATAL: modpost: GPL-incompatible module slusb.ko uses GPL-only symbol 'usb_unlink_urb' make[3]: *** [__modpost] Error 1 make[2]: *** [modules] Error 2 make[1]: *** [all] Error 2 make: *** [all] Error 2 Reproducible: Always Steps to Reproduce: 1. emerge =sys-kernel/gentoo-sources-2.6.25 2. emerge net-dialup/slmodem shadow ~ # emerge --info Portage 2.1.5_rc4 (default-linux/amd64/2007.0, gcc-4.2.3, glibc-2.7-r2, 2.6.25-gentoo x86_64) ================================================================= System uname: 2.6.25-gentoo x86_64 Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz Timestamp of tree: Sat, 19 Apr 2008 08:30:05 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.5 dev-lang/python: 2.5.2-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.2 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 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 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -pipe -O2 -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=nocona -pipe -O2 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="candy collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo http://dev.gentoo.org" LDFLAGS="" LINGUAS="pl en" MAKEOPTS="-s -j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="7zip X a52 aac acpi alsa amd64 amrnb amrwb atm audacious bash-completion branding bzip2 caps cddb cdparanoia chardet cups curl cxx dbus deprecated devil dga divx djvu dri dts dv dvd dvdr dvdread encode exif fbcon ffmpeg firefox flac fontconfig gecko gif gmedia gnutls gpm grub gtk hal icons iconv ipv6 java jpeg jpeg2k kde kdeenablefinal lame laptop libsamplerate lm_sensors logitech-mouse logrotate lzo mad midi mjpeg mmx mmxext mng mp2 mp3 mpeg mplayer ncurses network-cron nls no-old-linux nptl nptlonly nsplugin offensive ogg ogg123 opengl pam pcre pdf perl plugins png ppds python qt3 qt3support qt4 quicktime rar readline realmedia samba sdl slang smp spell sqlite sse sse2 ssl ssse3 svg symlink syslog themes theora threads tiff truetype unicode usb utempter v4l v4l2 vcd voice vorbis wifi wma wmf wmp x264 xanim xinerama xml xorg xscreensaver xv xvid yv12 zip zlib" ALSA_CARDS="hda-intel" 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
workaround: build slmodem with USE="-usb"
Created attachment 150485 [details, diff] slmodem-2.9.11_pre20080401.ebuild.diff diff to fixed ebuild
Why emerge prepare to link slusb.o although I use "-usb" as package USE-Flag? walkuer ~ # grep slmodem /etc/portage/package.use net-dialup/slmodem -usb walkuer ~ # rm /usr/portage/distfiles/slmodem* /usr/portage/distfiles/ungrab-winmodem* walkuer ~ # emerge -v slmodem These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] net-dialup/slmodem-2.9.11_pre20080401 USE="alsa -usb" 827 kB Total: 1 package (1 new), Size of downloads: 827 kB >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) net-dialup/slmodem-2.9.11_pre20080401 to / >>> Downloading 'http://pandemonium.tiscali.de/pub/gentoo/distfiles/slmodem-2.9.11-20080401.tar.gz' --2008-04-22 20:07:20-- http://pandemonium.tiscali.de/pub/gentoo/distfiles/slmodem-2.9.11-20080401.tar.gz Resolving pandemonium.tiscali.de... 195.52.219.14 Connecting to pandemonium.tiscali.de|195.52.219.14|:80... failed: Connection refused. >>> Downloading 'ftp://pandemonium.tiscali.de/pub/gentoo/distfiles/slmodem-2.9.11-20080401.tar.gz' --2008-04-22 20:07:21-- ftp://pandemonium.tiscali.de/pub/gentoo/distfiles/slmodem-2.9.11-20080401.tar.gz => `/usr/portage/distfiles/slmodem-2.9.11-20080401.tar.gz' Resolving pandemonium.tiscali.de... 195.52.219.14 Connecting to pandemonium.tiscali.de|195.52.219.14|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /pub/gentoo/distfiles ... done. ==> SIZE slmodem-2.9.11-20080401.tar.gz ... 843861 ==> PASV ... done. ==> RETR slmodem-2.9.11-20080401.tar.gz ... done. Length: 843861 (824K) 100%[=====================================================================================================================================================================>] 843,861 986K/s in 0.8s 2008-04-22 20:07:22 (986 KB/s) - `/usr/portage/distfiles/slmodem-2.9.11-20080401.tar.gz' saved [843861] * slmodem-2.9.11-20080401.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] >>> Downloading 'http://pandemonium.tiscali.de/pub/gentoo/distfiles/ungrab-winmodem-2.9.11-20080126.tar.gz' --2008-04-22 20:07:22-- http://pandemonium.tiscali.de/pub/gentoo/distfiles/ungrab-winmodem-2.9.11-20080126.tar.gz Resolving pandemonium.tiscali.de... 195.52.219.14 Connecting to pandemonium.tiscali.de|195.52.219.14|:80... failed: Connection refused. >>> Downloading 'ftp://pandemonium.tiscali.de/pub/gentoo/distfiles/ungrab-winmodem-2.9.11-20080126.tar.gz' --2008-04-22 20:07:22-- ftp://pandemonium.tiscali.de/pub/gentoo/distfiles/ungrab-winmodem-2.9.11-20080126.tar.gz => `/usr/portage/distfiles/ungrab-winmodem-2.9.11-20080126.tar.gz' Resolving pandemonium.tiscali.de... 195.52.219.14 Connecting to pandemonium.tiscali.de|195.52.219.14|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /pub/gentoo/distfiles ... done. ==> SIZE ungrab-winmodem-2.9.11-20080126.tar.gz ... 2334 ==> PASV ... done. ==> RETR ungrab-winmodem-2.9.11-20080126.tar.gz ... done. Length: 2334 (2.3K) 100%[=====================================================================================================================================================================>] 2,334 --.-K/s in 0.04s 2008-04-22 20:07:22 (57.9 KB/s) - `/usr/portage/distfiles/ungrab-winmodem-2.9.11-20080126.tar.gz' saved [2334] * ungrab-winmodem-2.9.11-20080126.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking slmodem-2.9.11-20080401.tar.gz ;-) ... [ ok ] * checking ungrab-winmodem-2.9.11-20080126.tar.gz ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.25-gentoo-r1 * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking slmodem-2.9.11-20080401.tar.gz to /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work >>> Unpacking ungrab-winmodem-2.9.11-20080126.tar.gz to /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work * Converting ungrab-winmodem-2.9.11-20080126/Makefile to use M= instead of SUBDIRS= ... [ ok ] * Applying slmodem-ungrab-winmodem-hp500.patch ... [ ok ] * Applying slmodem-2.9.11-makefile.patch ... [ ok ] * Applying slmodem-2.9.11-alsa-period-size.patch ... [ ok ] * Converting Makefile to use M= instead of SUBDIRS= ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401 ... make -C modem all make[1]: Entering directory `/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/modem' rebuild profile... cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_main.o -c modem_main.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_cmdline.o -c modem_cmdline.c modem_main.c: In function 'setup_stream': modem_main.c:429: warning: 'snd_pcm_sw_params_set_xfer_align' is deprecated (declared at /usr/include/alsa/pcm.h:1104) cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem.o -c modem.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_datafile.o -c modem_datafile.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_at.o -c modem_at.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_timer.o -c modem_timer.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_pack.o -c modem_pack.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_ec.o -c modem_ec.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_comp.o -c modem_comp.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_param.o -c modem_param.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_debug.o -c modem_debug.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o homolog_data.o -c homolog_data.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o dp_sinus.o -c dp_sinus.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o dp_dummy.o -c dp_dummy.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o sysdep_common.o -c sysdep_common.c cc -O2 -march=athlon64 -pipe -Wall -finline -I. -DCONFIG_DEBUG_MODEM -DSUPPORT_ALSA=1 -o modem_test.o -c modem_test.c cc -o slmodemd modem_main.o modem_cmdline.o modem.o modem_datafile.o modem_at.o modem_timer.o modem_pack.o modem_ec.o modem_comp.o modem_param.o modem_debug.o homolog_data.o dp_sinus.o dp_dummy.o dsplibs.o sysdep_common.o -lasound cc -o modem_test modem_test.o modem_cmdline.o modem.o modem_datafile.o modem_at.o modem_timer.o modem_pack.o modem_ec.o modem_comp.o modem_param.o modem_debug.o homolog_data.o dp_sinus.o dp_dummy.o dsplibs.o sysdep_common.o -lasound make[1]: Leaving directory `/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/modem' * Preparing ungrab-winmodem module make modules -C /usr/src/linux M=/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/ungrab-winmodem-2.9.11-20080126 make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r1' CC [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/ungrab-winmodem-2.9.11-20080126/ungrab-winmodem.o /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/ungrab-winmodem-2.9.11-20080126/ungrab-winmodem.c: In function 'softmodem_release_init': /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/ungrab-winmodem-2.9.11-20080126/ungrab-winmodem.c:83: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:506) Building modules, stage 2. MODPOST 1 modules CC /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/ungrab-winmodem-2.9.11-20080126/ungrab-winmodem.mod.o LD [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/ungrab-winmodem-2.9.11-20080126/ungrab-winmodem.ko make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r1' * Preparing slamr module i686-pc-linux-gnu-gcc -I/usr/src/linux/include -o kernel-ver kernel-ver.c make all KERNEL_VER=2.6.25-gentoo-r1 make[1]: Entering directory `/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers' make modules -C /usr/src/linux M=/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers make[2]: Entering directory `/usr/src/linux-2.6.25-gentoo-r1' CC [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers/amrmo_init.o CC [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers/sysdep_amr.o CC [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers/st7554.o LD [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers/slamr.o LD [M] /var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers/slusb.o Building modules, stage 2. MODPOST 2 modules FATAL: modpost: GPL-incompatible module slusb.ko uses GPL-only symbol 'usb_unlink_urb' make[3]: *** [__modpost] Error 1 make[2]: *** [modules] Error 2 make[2]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r1' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/work/slmodem-2.9.11-20080401/drivers' make: *** [all] Error 2 * * ERROR: net-dialup/slmodem-2.9.11_pre20080401 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3185: Called linux-mod_src_compile * environment, line 2413: Called die * The specific snippet of code: * eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CC=\"$(get-KERNEL_CC)\" LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"; * The die message: * Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS= KERNEL_DIR=/usr/src/linux 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/slmodem-2.9.11_pre20080401/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-dialup/slmodem-2.9.11_pre20080401/temp/environment'. *
Same here: usb use flag is removed. MODPOST 2 modules FATAL: modpost: GPL-incompatible module slusb.ko uses GPL-only symbol 'usb_unlink_urb' make[3]: *** [__modpost] Error 1 make[2]: *** [modules] Error 2 make[2]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r1' make[1]: *** [all] Error 2 Happens with both slmodem-2.9.11_pre20080126-r1 and slmodem-2.9.11_pre20080401
Nice solution, but I use usb modem :(
I just got bitten by this. I wonder whose idea this retarded source code self-enforcement is. Never mind the fact that I'm not actually violating the GPL when I build this module, only if I actually redistribute it. Hell, I could patch half of Windows into the kernel, compile the resulting source, print it on a t-shirt, make it do handstands and still obide by the GPL since I'm not distributing it. slmodem doesn't vioate the GPL either since it includes no non-GPL code. I'm pissed, I'm gonna go bitch about this on lkml, someone find a way to fix this without actually patching the kernel sources..
Please test slmodem-2.9.11_pre20080417 and post here the results.
slmodem-2.9.11_pre20080417 does not work. Building with -usb and getting the same gpl error.
(In reply to comment #7) > Please test slmodem-2.9.11_pre20080417 and post here the results. > I tried it too, but it desn't work
Created attachment 156327 [details] ebuild hack ebuild hack (if kernel version is >= 2.6.25, then USE=-usb and apply a patch so that usb modules are not compiled
Created attachment 156329 [details, diff] patch dirty patch that avoids compiling usb modules.
Comment on attachment 156327 [details] ebuild hack ebuild hack (if kernel version is >= 2.6.25, then USE=-usb and apply a patch so that usb modules are not compiled. also copy the patch file below to files/ folder.
Fixed net-dialup/slmodem-2.9.11_pre20080417, without revision bump. I preferred to do a quick hack and replace $(obj-m) with whatever modules I want to install (both of them can be disabled).