Make Calling Your Loved Ones Easier and Cheaper this Diwali

Diwali, or Deepawali as some Indians call it, is the pride and joy of Indian … more

Big Android BBQ 5.0 Recap – XDA TV

This fifth annual Big Android BBQ has come and gone. The speakers have spoke, the sponsors have … more

Microsoft to Counter “OK Google” with Bing Torque

When Microsoft is making apps for Android, users should be aware that something … more

Google Confirms “Android Lollipop Day” for November 3rd

A little over a week ago, Google announced the latest iteration of … more
Post Reply

Enable ZRam Compile Error

OP AAccount

27th January 2013, 03:57 AM   |  #1  
AAccount's Avatar
OP Senior Member
Thanks Meter: 1,457
 
838 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Sorry for bugging everyone again, but I'm in the process of trying to make my kernel and I enabled zram (since it worked for my GTab 10.1). Haven't modified any of the zram code. However, I got this compile error

Code:
drivers/gud/built-in.o: In function `.LANCHOR0':
mcDrvModule.c:(.data+0x0): multiple definition of `devices'
drivers/staging/built-in.o:xvmalloc.c:(.bss+0x3c0b50): first defined here
/home/Daniel/GTab10.1Dev/arm-2012.03/bin/arm-none-linux-gnueabi-ld: Warning: size of symbol `devices' changed from 4 in drivers/staging/built-in.o to 8 in drivers/gud/built-in.o
make[1]: *** [drivers/built-in.o] Error 1
make: *** [drivers] Error 2
Not exactly sure why this happens considering i haven't touched any of the gud drivers of staging/zram drivers at all.
28th January 2013, 09:27 PM   |  #2  
garyd9's Avatar
Recognized Developer
Flag Pittsburgh, PA
Thanks Meter: 1,989
 
1,968 posts
Join Date:Joined: Sep 2006
Which device? Based on your sig (and which section you are posting in) I'd guess the i9300, but based on the error message (in particular "/home/Daniel/GTab10.1Dev/"), I'd guess your working on the gtab 10.1 kernel.

Perhaps a full set of steps to repeat? How did you go about enabling zram, stock kernel source or something else? Which toolchain?

Finally, do you understand the error? I won't criticize you if you don't, but it's pretty obvious (at least to me) what the error message is saying and how you should go about digging into it a bit deeper.

Take care
Gary
The Following User Says Thank You to garyd9 For This Useful Post: [ View ]
29th January 2013, 04:15 AM   |  #3  
AAccount's Avatar
OP Senior Member
Thanks Meter: 1,457
 
838 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Quote:
Originally Posted by garyd9

Which device? Based on your sig (and which section you are posting in) I'd guess the i9300, but based on the error message (in particular "/home/Daniel/GTab10.1Dev/"), I'd guess your working on the gtab 10.1 kernel.

Perhaps a full set of steps to repeat? How did you go about enabling zram, stock kernel source or something else? Which toolchain?

Finally, do you understand the error? I won't criticize you if you don't, but it's pretty obvious (at least to me) what the error message is saying and how you should go about digging into it a bit deeper.

Take care
Gary

No, I'm not working on the galaxy tab 10.1 kernel. It's just that all the stuff needed (tool chain, where I keep my modifications) are in that folder so I'm just sticking with it. The way I enabled zram was just to enable it in .config "CONFIG_ZRAM=1" which then asked me if I wanted to enable the "zram for android" feature which I said yes. The kernel souce I'm using is the CM10.1 smdk4412 source since I use cyanogenmod. I am using the code sourcey march 2012 tool chain.

I did attempt to find a fix to the problem based on what little bit I know. In both the zram driver or the "gud" driver I'm guessing the same variable or structure is defined twice but differently each time. I think this is analogous to being 2 people at once? I did a grep in file text search to see where either a variable or structure named "devices" would have been defined. In neither of those folders did I find "devices". Yes, admittedly I'm no top dog developer and make modifications I can for personal enjoyment and maybe publication if it seems worthy.

But yeah, I didn't find anywhere in the gud or zram drivers where "devices" is being named/defined as a variable or structure. If I did find it, wouldn't it be easier to make the one with the smaller definition size bigger since going the other way would cut off data while a bit of extra storage never hurt? That's when I was planning to go with.

I'm sorry if the fix is so obvious.
29th January 2013, 04:58 AM   |  #4  
garyd9's Avatar
Recognized Developer
Flag Pittsburgh, PA
Thanks Meter: 1,989
 
1,968 posts
Join Date:Joined: Sep 2006
Re: Enable ZRam Compile Error
Sorry if my reply seemed confrontational... it wasn't intended that way...

I don't have the cm10 code handy on my phone (and won't be able to pull it and test compile for another day or so.)

However, can you try to rebuild the kernel after a "make clean" (or maybe a make target of mrproper even)? Also turn off ccache if you're using it. If that doesn't work, can you please post the kernel config so that someone else can drop it in and see if they get a similar result?


Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
The Following User Says Thank You to garyd9 For This Useful Post: [ View ]
29th January 2013, 06:02 AM   |  #5  
AAccount's Avatar
OP Senior Member
Thanks Meter: 1,457
 
838 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Quote:
Originally Posted by garyd9

Sorry if my reply seemed confrontational... it wasn't intended that way...

I don't have the cm10 code handy on my phone (and won't be able to pull it and test compile for another day or so.)

However, can you try to rebuild the kernel after a "make clean" (or maybe a make target of mrproper even)? Also turn off ccache if you're using it. If that doesn't work, can you please post the kernel config so that someone else can drop it in and see if they get a similar result?


Sent from my SAMSUNG-SGH-I317 using Tapatalk 2

I didn't take it as confrontational. I like to say it's better to admit your short comings than to fake what you're not. I did do a make clean before starting. I'll paste in the relevant .config changes tomorrow.
29th January 2013, 07:16 PM   |  #6  
NeoPhyTe.x360's Avatar
Retired Recognized Developer
Flag oυτ o иoωнєяє
Thanks Meter: 1,804
 
1,645 posts
Join Date:Joined: Aug 2009
Donate to Me
More
Search inside the code of zram_dev.c (drivers/staging/zram/zram_drv.c), now search the word: "num_devices";

It should appear something like;
Code:
	if (!num_devices) {
		pr_info("num_devices not specified. Using default: 1\n");
		num_devices = 1;
	}
there should appear value of 4 or 8; If the value there is 8, change it to 4, and if its value is 4, change it to 8



I don't know sure, but maybe you could fix it like this, or searching with grep -r "devices" /kernel/drivers/gud (and staging), and changing it with those values mentioned above
Last edited by NeoPhyTe.x360; 29th January 2013 at 07:28 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes