IncentivesPro Forum Index IncentivesPro
Leading USB solutions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Won't compile

 
Post new topic   Reply to topic    IncentivesPro Forum Index -> USB Redirector for Linux
View previous topic :: View next topic  
Author Message
MarkA007



Joined: 22 Apr 2015
Posts: 4

PostPosted: Wed Dec 19, 2018 6:18 pm    Post subject: Won't compile Reply with quote

Hello

An ASUS tinkerboard (headers correct ?)

Linux linaro-alip 4.4.16-00006-g4431f98-dirty #1 SMP Mon Apr 17 17:27:25 CST 2017 armv7l GNU/Linux

doese this make any sense to anyone ?

gcc: error: unrecognized command line option ‘-mgeneral-regs-only



Regards
Mark

Code:

make -C /lib/modules/4.4.16-00006-g4431f98-dirty/build M=/opt/usb-redirector-linux-arm/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.132+'
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
scripts/Makefile.build:277: recipe for target '/opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o' failed
make[2]: *** [/opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o] Error 1
Makefile:1471: recipe for target '_module_/opt/usb-redirector-linux-arm/files/modules/src/tusbd' failed
make[1]: *** [_module_/opt/usb-redirector-linux-arm/files/modules/src/tusbd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.132+'
Makefile:61: recipe for target 'default' failed
make: *** [default] Error 2
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 552

PostPosted: Thu Dec 20, 2018 2:01 pm    Post subject: Reply with quote

Hi Mark,
Quote:
make -C /lib/modules/4.4.16-00006-g4431f98-dirty/build M=/opt/usb-redirector-linux-arm/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.132+'

It looks like you are using wrong headers. Your kernel is 4.4.16, but headers are 4.4.132+:
Back to top
View user's profile Send private message
MarkA007



Joined: 22 Apr 2015
Posts: 4

PostPosted: Fri Dec 21, 2018 1:28 am    Post subject: Reply with quote

Many Thanks, learning all the time and as i thought...
Someone over on Ambian pointed me to the main repository, so now have a version with headers that it says it complies on...
but..


Linux tinkerboard 4.14.70-rockchip #270 SMP PREEMPT Wed Sep 19 11:40:40 CEST 2018 armv7l GNU/Linux

code follows, not complete but you get the idear.
MarkA


Code:

make -C /lib/modules/4.14.70-rockchip/build M=/opt/usb-redirector-linux-arm/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.70-rockchip'
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/driver.o
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.o
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘lIIIlIIlI’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:65:77: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
 ,IIIll);break;}}while((0x10e4+1729-0x17a5));if(IIIll!=(0x1b58+2741-0x260d)){if(
                                                                             ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:66:27: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 llIlIIl)cdev_del(llIlIIl);if(lIllIll!=MKDEV((0x1ba+4053-0x118f),
                           ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:66:27: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:67:77: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 (0xd9c+6089-0x2565)))unregister_chrdev_region(lIllIll,(0x1402+1301-0x1818));if(
                                                                             ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:67:77: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:68:32: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 IlllIlI)class_destroy(IlllIlI);llIlIIl=NULL;lIllIll=MKDEV((0xcb3+273-0xdc4),
                                ^~~~~~~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘IllIIlII’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:73:10: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
 llIlIIl);if(lIllIll!=MKDEV((0x63b+2597-0x1060),(0x498+2770-0xf6a)))
          ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:74:44: note: ...this statement, but the latter is misleadingly in
dented as if it is guarded by the ‘if’
 unregister_chrdev_region(lIllIll,IIIlllIl);if(IlllIlI)class_destroy(IlllIlI);
                                            ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘lIlllIIl’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:165:1: warning: this ‘if’ clause does not guard... [-Wmisleading-
indentation]
 if(IIIlllll<(0x134d+5045-0x2702)||IIIlllll>=IIIlllIl)return-EINVAL;if(lIllllII<
 ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:165:68: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 if(IIIlllll<(0x134d+5045-0x2702)||IIIlllll>=IIIlllIl)return-EINVAL;if(lIllllII<
                                                                    ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:165:68: warning: this ‘if’ clause does not guard... [-Wmisleading
-indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:166:55: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 (0x1b38+200-0x1c00)||lIllllII>=IIIlllIl)return-EINVAL;if(IIIlllll>lIllllII)
                                                       ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:166:55: warning: this ‘if’ clause does not guard... [-Wmisleading
-indentation]
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:167:15: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 return-EINVAL;mutex_lock(&lIIIIll);for(i=IIIlllll;i<=lIllllII;i++){if(IIIIllll[i
               ^~~~~~~~~~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c: In function ‘lllIlIlll’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:217:53: warning: this ‘if’ clause does not guard... [-Wmisleading
-indentation]
 IlIlIl*lIllI;mutex_lock(&lIIIIll);lIllI=IIIIllll[m];if(lIllI&&lIllI->ops.
                                                     ^~
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/cdev.c:218:46: note: ...this statement, but the latter is misleadingly i
ndented as if it is guarded by the ‘if’
 lIlIIlII)lIllI->ops.lIlIIlII(lIllI->context);mutex_unlock(&lIIIIll);if(lIllI){
                                              ^~~~~~~~~~~~
  CC [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/minor_loader.o
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/minor_loader.c: In function ‘IIlIllllI’:
/opt/usb-redirector-linux-arm/files/modules/src/tusbd/minor_loader.c:87:28: warning: this ‘if’ clause does not guard... [-Wmis
leading-indentation]
 ;INIT_LIST_HEAD(&IIIIIlIl);if(copy_from_user(&IlIIIllI,lllIl,sizeof(IlIIIllI)))


Code:
               ^~
  LD [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/tusbd.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /opt/usb-redirector-linux-arm/files/modules/src/tusbd/tusbd.mod.o
  LD [M]  /opt/usb-redirector-linux-arm/files/modules/src/tusbd/tusbd.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.14.70-rockchip'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IncentivesPro Forum Index -> USB Redirector for Linux All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group