Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543702 - net-dialup/martian-modem-20100123: martian.c:797:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'martian_device_gatherinfo'
Summary: net-dialup/martian-modem-20100123: martian.c:797:1: error: expected '=', ',',...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Roger
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 16:12 UTC by Toralf Förster
Modified: 2015-03-22 16:38 UTC (History)
3 users (show)

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


Attachments
emerge log (net-dialup-martian-modem-20100123-20150318-152221.log,10.80 KB, text/plain)
2015-03-18 16:12 UTC, Toralf Förster
Details
martian-remove_devhotplug_atributes.patch (martian-remove_devhotplug_atributes.patch,1.81 KB, patch)
2015-03-21 18:25 UTC, Roger
Details | Diff
FOR_REFERENCE_ONLY-martian-modem-source.diff (martian-modem-source.diff,2.75 KB, patch)
2015-03-21 18:46 UTC, Roger
Details | Diff
martian-modem-20100123-r1.ebuild (martian-modem-20100123-r1.ebuild,3.48 KB, text/plain)
2015-03-21 20:51 UTC, Roger
Details
martian-modem-20100123-linux-3.8.patch (martian-modem-20100123-linux-3.8.patch,2.55 KB, patch)
2015-03-21 20:52 UTC, Roger
Details | Diff
martian-modem-20100123-linux-3.10.patch (martian-modem-20100123-linux-3.10.patch,2.21 KB, patch)
2015-03-21 20:53 UTC, Roger
Details | Diff
martian-modem-20100123-r1.ebuild (martian-modem-20100123-r1.ebuild,3.48 KB, text/plain)
2015-03-21 21:17 UTC, Roger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-03-18 16:12:49 UTC
Created attachment 399200 [details]
emerge log

/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c: At top level:
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:796:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘martian_device_gatherinfo’
 martian_device_gatherinfo (const struct pci_dev *dev, const struct pci_device_i
 ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1001:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mars_device_probe’
 mars_device_probe (struct pci_dev *dev, const struct pci_device_id *ent)
 ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1039:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mars_remove’
 static void __devexit mars_remove (struct pci_dev *dev) 
                       ^
In file included from /var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1045:0:
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian_ids.c:11:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘static’
 __devinitdata static struct pci_device_id martian_ids[] = {
               ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1050:12: error: ‘mars_device_probe’ undeclared here (not in a function)
  .probe  = mars_device_probe,
            ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1051:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
  .remove  = __devexit_p (mars_remove),
  ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1051:26: error: ‘mars_remove’ undeclared here (not in a function)
  .remove  = __devexit_p (mars_remove),
                          ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1052:14: error: ‘martian_ids’ undeclared here (not in a function)
  .id_table = martian_ids
              ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1065:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘detach_from_serial_class’
 static void __devinit detach_from_serial_class (unsigned int class, unsigned in
                       ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1086:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘detach_from_serial’
 static void __devinit detach_from_serial(void) 
                       ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c: In function ‘martian_init’:
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1107:2: error: implicit declaration of function ‘detach_from_serial’ [-Werror=implicit-function-declaration]
  detach_from_serial();
  ^
In file included from /var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:35:0:
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c: At top level:
include/linux/module.h:138:40: error: ‘__mod_pci__martian_ids_device_table’ aliased to undefined symbol ‘martian_ids’
   extern const struct type##_device_id __mod_##type##__##name##_device_table \
                                        ^
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1127:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’
 MODULE_DEVICE_TABLE( pci, martian_ids );
 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target '/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.o' failed
make[3]: *** [/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.o] Error 1
Makefile:1382: recipe for target '_module_/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule' failed
make[2]: *** [_module_/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule] Error 2
make[2]: Leaving directory '/usr/src/linux-3.19.1-gentoo'
Makefile:20: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: net-dialup/martian-modem-20100123::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-dialup/martian-modem-20100123::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-dialup/martian-modem-20100123::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-dialup:martian-modem-20100123:20150318-152221.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-dialup/martian-modem-20100123/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dialup/martian-modem-20100123/temp/environment'.
 * Working directory: '/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123'
 * S: '/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123'


This is an amd64 unstable chroot image at a hardened host acting as a tinderbox.
The log is stored in amd64-unstable-libtool_20150314//var/log/portage/_emerge_20150318-162231.log
quick search: https://bugs.gentoo.org/buglist.cgi?quicksearch=net-dialup%2Fmartian-modem


Portage 2.2.18 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.8.3, glibc-2.20-r2, 3.19.1-hardened x86_64)
=================================================================
System uname: Linux-3.19.1-hardened-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16164756 total,   1930584 free
KiB Swap:   16777212 total,  16717092 free
Timestamp of repository gentoo: Tue, 17 Mar 2015 17:30:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.8.3::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/entropy /usr/lib64/fax /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/neatx/home /var/rancid/.cloginrc /var/spool/fax/etc /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --tree --quiet-build --jobs 1"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aes-ni alsa amd64 apache2 avx avx2 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit corefonts cracklib crypt cups cxx dbus declarative dnssec dot dri drmkms dts dvd dvdr ecc emboss encode exif extraengine fam ffmpeg firefox flac fontconfig fortran fpm gd gdbm gif glamor gpm gtk gudev gui iconv icu isag jadetex jpeg kde kipi kvm lapack lcms libav libkms libnotify libvirtd logrotate macvtap mad mbox minizip mmx mng modules mp3 mp4 mpeg multilib mysql ncurses nls nptl ogg opengl openmp openssl pam pango pax_kernel pcre pcre16 pdf phonon plasma png policykit ppds python qemu qt3support qt4 readline sdl session spell spice sqlite sse sse2 sse4 sse4_1 sse4_2 ssh-askpass ssl ssse3 startup-notification svg tcpd theora thinkpad threads tiff tk tls truetype udev udisks uml unicode upower usb usbredir uxa v4l v4l2 video vorbis wxwidgets x264 xa xcb xcomposite xinerama xkb xml xmp xscreensaver xslt xv xvfb xvid xvmc zenmap zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldsty le oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Roger 2015-03-21 17:18:34 UTC
I haven't used this driver in the longest time, but I still have a laptop using this driver for it's modem.  So, I'll take a look at this.

1) The first (implicit declaration) error is:
martian.c:188:9: error: implicit declaration of function 'PDE' [-Werror=implicit-function-declaration] -->  struct proc_dir_entry *entry = PDE (inode);

Which I think is defined within <linux/proc_fs.h>.  Might need to add something to the top of modem.c (similar what the patches do to add <linux/sched.h>.  (I did and nothing resolved, so need to grep the Linux headers for this function and verify the definition is pulling in proc_dir_entry!)

2) The second (implicit declaration) error I see is:
/var/tmp/portage/net-dialup/martian-modem-20100123/work/martian-full-20100123/kmodule/martian.c:1052:2: error: implicit declaration of function '__devexit_p' [-Werror=implicit-function-declaration]  --> .remove  = __devexit_p (mars_remove),

According to "http://forum.tinycorelinux.net/index.php?topic=15790.0" ... "__devinit,  __devexit and __devexit_p which are no longer supported in kernel 3.8.x"  According to his fix, he simply removed the references, but wonder if we can simply delete and everything will work as expected or we need to further hack to workaround this kernel level change!

These are the first two legible errors I was to initially see within the compilation.  There maybe more, or just fixing one or all of them may provide a good compilation.
Comment 2 Roger 2015-03-21 17:30:17 UTC
OK.  Patch number #1 for this bug will be likely for removing any __dev* types, as apparently they're no longer needed (as per one patch titled) "CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed." per "http://lists.lm-sensors.org/pipermail/lm-sensors/2012-November/037668.html"

Examining the patches on the Internet for this problem, simply removing all the __dev* (type casts?) along with any associated following member's parenthesis should resolve this problem.
Comment 3 Roger 2015-03-21 18:16:36 UTC
1) The relocation and/or redefinition of "proc_dir_entry" is as of ">= KERNEL_VERSION(3, 10)" or >=kernel-3.10

2) The removing of __dev* types is as of ">= KERNEL_VERSION(3, 8)" or >=kernel-3.8

I'm still researching "proc_dir_entry" as it looks like there's two solutions, either include the newer location of this function which is apparently here fs/proc/internal.h or rewrite the included functions to utilize the newer implementations. (ie. http://blog.gnu-designs.com/solved-vmware-tools-create_proc_entry-error-with-vmballoon_procfs_init-on-linux-kernel-3-11-0/)
Comment 4 Roger 2015-03-21 18:25:38 UTC
Created attachment 399392 [details, diff]
martian-remove_devhotplug_atributes.patch

Documentation: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, and __devexit

(This change was made within the Linux Kernel during >= KERNEL-3.8)


So within the Martian EBuild, apply this patch at >=kernel-3.8
Comment 5 Roger 2015-03-21 18:37:50 UTC
Here's what looks like a working patch, but it redefines the now unimplemented __dev attributes/typecast.  Personally I think it's cleaner just to remove the __dev* typecast, as it apparently adds garbage when reading the code.

Looks like somebody already did do some work (properly and more securely?) reimplementing the moved/dropped "proc_dir_entry" and "proc_create_data" kernel functions.  If somebody has some advice if this is a quick and efficient, then say so and I'll implement this method.  Or otherwise, denoting another header file defining the original functions, etc, might be best.

https://launchpadlibrarian.net/176446517/martian-modem-source.diff

I'll also post this martian-modem-source.diff for reference only as I haven't done and research concerning simply copying this code.
Comment 6 Roger 2015-03-21 18:46:06 UTC
Created attachment 399402 [details, diff]
FOR_REFERENCE_ONLY-martian-modem-source.diff

This patch was submitted to the Ubuntu Launchpad Bugs forum by Paul McClay (pmc-b) on 2014-05-28.

http://bugs.launchpad.net/ubuntu/+source/martian-modem/+bug/1323895

Unknown if this is a working patch.  Submitted only as a reference here for working through the "proc_dir_entry" "create_proc_entry" implicit declarations or the relocation of these defined functions to "linux-3.18.7-gentoo/fs/proc/internal.h".
Comment 7 Roger 2015-03-21 18:58:50 UTC
And another reimplementation of "proc_dir_entry" "create_proc_entry", as well as providing good background information and noting the possibility of a race condition using the older functions!

http://gitorious.org/dahdi-extra/dahdi-linux/commit/84ccc652b6cb3f57e6cff6ceab201a553bfe9561
Comment 8 Roger 2015-03-21 19:37:06 UTC
Also, searching the Portage Tree for "proc_dir_entry" or "create_proc_entry" shows there's a gentoo_wrapper implemented within a patch for ati-drivers package and it's not pretty!  (ie. linux-3.10-proc.diff)

One of the previous re-implementations of "proc_dir_entry" and "create_proc_entry" discussed using kstat to access the now internal implimentations, and this method is used for sys-kernel/spl (ie. spl-0.6.1-linux-3.10-compat.patch) and looks a little more readable or readily implementable for martian modem here.
Comment 9 Roger 2015-03-21 20:51:48 UTC
Created attachment 399410 [details]
martian-modem-20100123-r1.ebuild

Added martian-modem-20100123-linux-3.8.patch
Per Gentoo Bug #543702, CONFIG_HOTPLUG is going away as an option.  As of Linux Kernel 3.8, the __dev* markings need to be removed.  This patch removes the use of __devinit, __devexit_p, and __devexit as the type cast simply isn't needed any longer.

Added martian-modem-20100123-linux-3.10.patch
Per Gentoo Bug #543702, "proc_dir_entry" and "create_proc_entry" Linux Kernel header definition was moved and only accessible internally as of Linux Kernel 3.10.  This patch originates from Paul McClay (2014.05.28) and posted to Ubuntu Launchpad.
Comment 10 Roger 2015-03-21 20:52:55 UTC
Created attachment 399412 [details, diff]
martian-modem-20100123-linux-3.8.patch

Per Gentoo Bug #543702, CONFIG_HOTPLUG is going away as an option.  As of Linux Kernel 3.8, the __dev* markings need to be removed.  This patch removes the use of __devinit, __devexit_p, and __devexit as the type cast simply isn't needed any longer.
Comment 11 Roger 2015-03-21 20:53:29 UTC
Created attachment 399414 [details, diff]
martian-modem-20100123-linux-3.10.patch

Per Gentoo Bug #543702, "proc_dir_entry" and "create_proc_entry" Linux Kernel header definition was moved and only accessible internally as of Linux Kernel 3.10.  This patch originates from Paul McClay (2014.05.28) and posted to Ubuntu Launchpad.
Comment 12 Roger 2015-03-21 20:59:34 UTC
Toralf Förster: You need to compile and test this build on your platform.  Let us know if the modem works.  If it doesn't, then we (or somebody else) needs to work a little harder on the loss (or moving) of the "proc_dir_entry" and "create_proc_entry" function definitions.

This compiles fine on AMD64 (ie. Intel 64 bit), but likely will not work as this driver is likely meant for 32 bit hardware.  There are a few compiler warnings, but looks normal or expected per the author.  I do have a 32 bit laptop which has this modem, but I neither have a dial-up ISP, and my modem tends to be troublesome to setup and/or conflicts with IRDA and other hardware configurations.  So I don't venture into trying to use it unless I'm in a dire need! ;-)
Comment 13 Roger 2015-03-21 21:17:09 UTC
Created attachment 399416 [details]
martian-modem-20100123-r1.ebuild

* Added martian-modem-20100123-linux-3.8.patch
Per Gentoo Bug #543702, CONFIG_HOTPLUG is going away as an option.  As of Linux Kernel 3.8, the __dev* markings need to be removed.  This patch removes the use of __devinit, __devexit_p, and __devexit as the type cast simply isn't needed any longer.

* Added martian-modem-20100123-linux-3.10.patch
Per Gentoo Bug #543702, "proc_dir_entry" and "create_proc_entry" Linux Kernel header definition was moved and only accessible internally as of Linux Kernel 3.10.  This patch originates from Paul McClay (2014.05.28) and posted to Ubuntu Launchpad.

* Removed the call for EAPI=5, as the functions used within this EBuild only require EAPI=2.  (ie. Suckless ;-)


Remember, if this EBuild works, file a stabilization request for martian-modem-20100123-r1.ebuild via the Gentoo Bugzilla here!
Comment 14 Pacho Ramos gentoo-dev 2015-03-22 12:27:51 UTC
I am unsure where -Werror is being appended :S
Comment 15 Pacho Ramos gentoo-dev 2015-03-22 12:28:32 UTC
+*martian-modem-20100123-r1 (22 Mar 2015)
+
+  22 Mar 2015; Pacho Ramos <pacho@gentoo.org>
+  +files/martian-modem-20100123-linux-3.10.patch,
+  +files/martian-modem-20100123-linux-3.8.patch,
+  +martian-modem-20100123-r1.ebuild, -martian-modem-20100123.ebuild:
+  Fix build with recent kernels (#543702 by Toralf Förster, fixes by Roger),
+  drop old
+
Comment 16 Roger 2015-03-22 16:38:35 UTC
"-Werror=implicit-int","-Werror=strict-prototypes" are likely default build flags whenever GCC is called.  Obviously when a variable or function is implicitly called, something is going to break, and usually break badly.

"-Wunused-function","-Wunused-value" might also be set by default by GCC, but might also be default flags by Portage's GCC internal build system.  I don't think I have any of these flags set here at all, except my commented-out debug GCC line within make.conf, or my other Portage debug GCC profiles for which martian-modem is not apart of.  Although the end user doesn't really need to worry about these warnings, it certainly is nice when writing code in the case you misspelled a variable or function's name.  And sometimes on large coding projects, only your friend's will have a chance to catch unless you search your logs for warnings after every build.  In writing code, it's quite common to comment or delete variables, leaving the unused declaration behind for possible future use.  In the case of martian-modem, either this occurred or something was started and later dropped due to bugs.  (Could also be an internally developed and used feature.)

None of these CFLAG settings are of much concern to me, as whenever I build code I almost always want those reported unless I'm intentionally trying to hide something.  (Which is almost never.)  So yea, likely default CFLAG GCC/Portage settings.