Github Tutorial App Shows You How to Use… Github

Github can get pretty complicated and using it can become quite daunting, especially … more

Google Glass-like Clip-On For Regular Glasses Developed by Sony

For the price of $2,000, a pair of glasses that can run apps, take pictures, … more

Micromax Takes OnePlus to Court! Android Wear Receives Lollipop – XDA TV

Android 5.0 Lollipop is available officially for the Moto 360! … more

Google Invites Selected Devs to Buy Project Tango Development Kit

Just about a month ago, the curious Project Tango development kit was … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Kernel Compiling Error

OP srsdani

13th April 2014, 06:07 PM   |  #1  
OP Senior Member
Galati
Thanks Meter: 102
 
111 posts
Join Date:Joined: Jan 2011
More
Code:
  CC      net/netfilter/xt_qtaguid.o
  CC      net/netfilter/xt_quota.o
  CC      net/netfilter/xt_quota2.o
  CC      net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
                 from include/linux/cache.h:4,
                 from include/linux/time.h:7,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
srsdani@ubuntu:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
13th April 2014, 09:48 PM   |  #2  
OP Senior Member
Galati
Thanks Meter: 102
 
111 posts
Join Date:Joined: Jan 2011
More
Any ideas?
14th April 2014, 05:08 AM   |  #3  
Junior Member
Flag Somewhere in India!!
Thanks Meter: 16
 
20 posts
Join Date:Joined: Mar 2014
More
Kernel Compilation
Quote:
Originally Posted by srsdani

Code:
  CC      net/netfilter/xt_qtaguid.o
  CC      net/netfilter/xt_quota.o
  CC      net/netfilter/xt_quota2.o
  CC      net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
                 from include/linux/cache.h:4,
                 from include/linux/time.h:7,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
srsdani@ubuntu:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.

I guess you are looking on another file.

Code:
error, forbidden warning: dynamic_debug.h:75
I guess there is a problem in dynamic_debug.h in line 75. I guess you need to initialise something.
The Following User Says Thank You to #Su For This Useful Post: [ View ]
14th April 2014, 12:53 PM   |  #4  
OP Senior Member
Galati
Thanks Meter: 102
 
111 posts
Join Date:Joined: Jan 2011
More
Here is dynamic_debug.h but I can't find the problem.
14th April 2014, 06:33 PM   |  #5  
OP Senior Member
Galati
Thanks Meter: 102
 
111 posts
Join Date:Joined: Jan 2011
More
I will appreciate any opinion.
15th April 2014, 03:28 AM   |  #6  
Junior Member
Flag Somewhere in India!!
Thanks Meter: 16
 
20 posts
Join Date:Joined: Mar 2014
More
Smile Try this method!
Quote:
Originally Posted by srsdani

Here is dynamic_debug.h but I can't find the problem.

I am not much used to kernel related development but I analysed your dynamic_debug.h and found the problem (maybe a problem):

Normally, a do-while loop syntax is this:
Code:
do
{
 Statement1;
 Statement2;
 ...
}while(condition);
But I don't see a semicolon in the end of those loops in your code. This maybe a syntax error.

Also analyse these codes:
Code:
#if defined(CONFIG_DYNAMIC_DEBUG)
extern int ddebug_remove_module(const char *mod_name);
extern __printf(2, 3)
int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);

struct device;

extern __printf(3, 4)
int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
                      const char *fmt, ...);

struct net_device;

extern __printf(3, 4)
int __dynamic_netdev_dbg(struct _ddebug *descriptor,
                         const struct net_device *dev,
                         const char *fmt, ...);
Every intialisation has 4 protocols but the first initialisation contain only 3.
Try the above things and tell me back if it works or not.
The Following User Says Thank You to #Su For This Useful Post: [ View ]
16th April 2014, 04:14 PM   |  #7  
OP Senior Member
Galati
Thanks Meter: 102
 
111 posts
Join Date:Joined: Jan 2011
More
So, the problem was in Makefile and .config. I compared and added some flags from Mako (from franco) and it worked. I still have some warning/s, some breakpoints but at least now it's working. Anyway, this thread may be useful for all of us. Thanks a lot for help.
Now, another problem.
Code:
  CC      fs/proc/loadavg.o
  CC      fs/proc/meminfo.o
fs/proc/meminfo.c: In function ‘meminfo_proc_show’:
fs/proc/meminfo.c:175:1: internal compiler error: in optimize_sc, at modulo-sched.c:1069
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.launchpad.net/gcc-linaro> for instructions.
make[2]: *** [fs/proc/meminfo.o] Error 1
make[1]: *** [fs/proc] Error 2
make: *** [fs] Error 2
srsdani@ubuntu:~/kernel2$
With linaro 4.8.3 => OK;
linaro 4.8.3 + A15 optimize=> fail, error above. meminfo.c it's exactly like the one from nexus 4.
FIX: compiler bug;
Last edited by srsdani; 5th June 2014 at 10:32 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes