# Compile under Linux (Ubuntu)

**URL:** <https://forum.sierrawireless.com/t/compile-under-linux-ubuntu/8056>\
**Category:** Forum and Source related topics\
**Created:** [July 14, 2015, 1:06pm UTC](https://forum.sierrawireless.com/t/compile-under-linux-ubuntu/8056 "2015-07-14T13:06:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![suneandersen](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@suneandersen](https://forum.sierrawireless.com/u/suneandersen)\
**Post date:** [July 14, 2015, 1:06pm UTC](https://forum.sierrawireless.com/t/compile-under-linux-ubuntu/8056/1 "2015-07-14T13:06:44Z")

</div>

I need to get the Gobi driver to run for some future SDK fun. But something is wrong when I try to compile the GobiNet driver.  
The package I’m trying : SierraLinuxQMIdriversS2.22N2.29.tar.bz2 from [source.sierrawireless.com](http://source.sierrawireless.com)

My System:  
uname -a  
Linux HP-Elite2 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86\_64 x86\_64 x86\_64 GNU/Linux

I get an error when trying to compile… Any ideas why??

Before :  
Make sure you have a network connection and issue the following commands:  
sudo apt-get install build-essential make gcc  
sudo apt-get install linux-headers-`uname -r`

Building and Installing the Drivers  
cd GobiSerial; make; sudo make install  
cd GobiNet; make; sudo make install  
sudo modprobe GobiSerial [debug=Y]  
sudo modprobe GobiNet [debug=Y]

Output:  
rm -rf \*.o _~ core .depend ._.cmd \*.ko _.mod.c .tmp\_versions Module._ modules.order  
make -C /lib/modules/3.19.0-22-generic/build M=/tmp/GobiNet modules  
make[1]: Entering directory ‘/usr/src/linux-headers-3.19.0-22-generic’  
CC [M] /tmp/GobiNet/GobiUSBNet.o  
/tmp/GobiNet/GobiUSBNet.c:1028:1: warning: data definition has no type or storage class  
MODULE\_DEVICE\_TABLE( usb, GobiVIDPIDTable );  
^  
/tmp/GobiNet/GobiUSBNet.c:1028:1: error: type defaults to ‘int’ in declaration of ‘MODULE\_DEVICE\_TABLE’ [-Werror=implicit-int]  
/tmp/GobiNet/GobiUSBNet.c:1028:1: warning: parameter names (without types) in function declaration  
/tmp/GobiNet/GobiUSBNet.c:65:24: error: expected declaration specifiers or ‘…’ before string constant  
#define DRIVER\_VERSION “2011-07-29-1026”  
^  
/tmp/GobiNet/GobiUSBNet.c:1239:17: note: in expansion of macro ‘DRIVER\_VERSION’  
MODULE\_VERSION( DRIVER\_VERSION );  
^  
/tmp/GobiNet/GobiUSBNet.c:66:23: error: expected declaration specifiers or ‘…’ before string constant  
#define DRIVER\_AUTHOR “Qualcomm Innovation Center”  
^  
/tmp/GobiNet/GobiUSBNet.c:1240:16: note: in expansion of macro ‘DRIVER\_AUTHOR’  
MODULE\_AUTHOR( DRIVER\_AUTHOR );  
^  
/tmp/GobiNet/GobiUSBNet.c:67:21: error: expected declaration specifiers or ‘…’ before string constant  
#define DRIVER\_DESC “GobiNet”  
^  
/tmp/GobiNet/GobiUSBNet.c:1241:21: note: in expansion of macro ‘DRIVER\_DESC’  
MODULE\_DESCRIPTION( DRIVER\_DESC );  
^  
/tmp/GobiNet/GobiUSBNet.c:1242:16: error: expected declaration specifiers or ‘…’ before string constant  
MODULE\_LICENSE(“Dual BSD/GPL”);  
^  
/tmp/GobiNet/GobiUSBNet.c:1249:22: error: expected ‘)’ before ‘bool’  
module\_param( debug, bool, S\_IRUGO | S\_IWUSR );  
^  
/tmp/GobiNet/GobiUSBNet.c:1250:26: error: expected ‘)’ before string constant  
MODULE\_PARM\_DESC( debug, “Debuging enabled or not” );  
^  
/tmp/GobiNet/GobiUSBNet.c:1252:30: error: expected ‘)’ before ‘bool’  
module\_param( interruptible, bool, S\_IRUGO | S\_IWUSR );  
^  
/tmp/GobiNet/GobiUSBNet.c:1253:34: error: expected ‘)’ before string constant  
MODULE\_PARM\_DESC( interruptible, “Listen for and return on user interrupt” );  
^  
/tmp/GobiNet/GobiUSBNet.c:1255:30: error: expected ‘)’ before ‘int’  
module\_param( txQueueLength, int, S\_IRUGO | S\_IWUSR );  
^  
/tmp/GobiNet/GobiUSBNet.c:1257:19: error: expected ‘)’ before string constant  
“Number of IP packets which may be queued up for transmit” );  
^  
cc1: some warnings being treated as errors  
scripts/Makefile.build:257: recipe for target ‘/tmp/GobiNet/GobiUSBNet.o’ failed  
make[2]: \*\*\* [/tmp/GobiNet/GobiUSBNet.o] Error 1  
Makefile:1394: recipe for target ‘_module_/tmp/GobiNet’ failed  
make[1]: \*\*\* [_module_/tmp/GobiNet] Error 2  
make[1]: Leaving directory ‘/usr/src/linux-headers-3.19.0-22-generic’  
Makefile:8: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![lotam](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@lotam](https://forum.sierrawireless.com/u/lotam)\
**Post date:** [October 8, 2015, 8:23am UTC](https://forum.sierrawireless.com/t/compile-under-linux-ubuntu/8056/2 "2015-10-08T08:23:43Z")

</div>

Hi suneandersen,

The driver version you are using is outdated, please refer to QMI driver history:  
[http://source.sierrawireless.com/resources/airprime/software/usb-drivers-linux-qmi-software-history-item/](http://source.sierrawireless.com/resources/airprime/software/usb-drivers-linux-qmi-software-history-item/)

If possible, please try the latest one available which should give you less error.  
The remaining error was because of kernel change in 3.19, which was fixed in upcoming driver.

If you want, you can change manually below in QMIDevice.c (S2.24N2.33) to solve the compile issue:

```auto
pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
   to
pFilp->f_op = pFilp->f_path.dentry->d_inode->i_fop;
```

Also seems like inappropriate section, it should be under “MC/EM Series”.  
Hope it helps.  
Thx
