Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,673 Members 41,051 Now Online
XDA Developers Android and Mobile Development Forum

Enable ZRam Compile Error

Tip us?
 
AAccount
Old
#1  
AAccount's Avatar
Senior Member - OP
Thanks Meter 1286
Posts: 772
Join Date: Sep 2010
Location: Canada's MEANEST city: Toronto

 
DONATE TO ME
Default Enable ZRam Compile Error

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.
Sony Tablet Z:(given to mom) Omni 4.4.4; TWRP 2.7.1.0
Galaxy S3 I9300: Omni4.4.4; Devil Kernel 2; TWRP 2.7.1.0
Galaxy Tab 10.1 Wifi: Omni4.4.4; MY A1 Kernel V1.9; TWRP 2.7.1.0
Galaxy S I9000M:(given to mom) Omni 4.4.4; TWRP 2.7.1.0

"It's the assumptions that kill you." --Me
"All the gadgets in the world aren't as much fun as good friends." --Me
 
garyd9
Old
#2  
garyd9's Avatar
Recognized Developer
Thanks Meter 1963
Posts: 1,946
Join Date: Sep 2006
Location: Pittsburgh, PA
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

Donations: I don't accept donations, but if you are feeling charitable, help a child by going to http://www.shrinershospitalsforchildren.org/
and click the "Donate Now" link at the top.
The Following User Says Thank You to garyd9 For This Useful Post: [ Click to Expand ]
 
AAccount
Old
#3  
AAccount's Avatar
Senior Member - OP
Thanks Meter 1286
Posts: 772
Join Date: Sep 2010
Location: Canada's MEANEST city: Toronto

 
DONATE TO ME
Quote:
Originally Posted by garyd9 View Post
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.
Sony Tablet Z:(given to mom) Omni 4.4.4; TWRP 2.7.1.0
Galaxy S3 I9300: Omni4.4.4; Devil Kernel 2; TWRP 2.7.1.0
Galaxy Tab 10.1 Wifi: Omni4.4.4; MY A1 Kernel V1.9; TWRP 2.7.1.0
Galaxy S I9000M:(given to mom) Omni 4.4.4; TWRP 2.7.1.0

"It's the assumptions that kill you." --Me
"All the gadgets in the world aren't as much fun as good friends." --Me
 
garyd9
Old
#4  
garyd9's Avatar
Recognized Developer
Thanks Meter 1963
Posts: 1,946
Join Date: Sep 2006
Location: Pittsburgh, PA
Default 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

Donations: I don't accept donations, but if you are feeling charitable, help a child by going to http://www.shrinershospitalsforchildren.org/
and click the "Donate Now" link at the top.
The Following User Says Thank You to garyd9 For This Useful Post: [ Click to Expand ]
 
AAccount
Old
#5  
AAccount's Avatar
Senior Member - OP
Thanks Meter 1286
Posts: 772
Join Date: Sep 2010
Location: Canada's MEANEST city: Toronto

 
DONATE TO ME
Quote:
Originally Posted by garyd9 View Post
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.
Sony Tablet Z:(given to mom) Omni 4.4.4; TWRP 2.7.1.0
Galaxy S3 I9300: Omni4.4.4; Devil Kernel 2; TWRP 2.7.1.0
Galaxy Tab 10.1 Wifi: Omni4.4.4; MY A1 Kernel V1.9; TWRP 2.7.1.0
Galaxy S I9000M:(given to mom) Omni 4.4.4; TWRP 2.7.1.0

"It's the assumptions that kill you." --Me
"All the gadgets in the world aren't as much fun as good friends." --Me
 
NeoPhyTe.x360
Old
(Last edited by NeoPhyTe.x360; 29th January 2013 at 07:28 PM.)
#6  
NeoPhyTe.x360's Avatar
Retired Recognized Developer
Thanks Meter 1804
Posts: 1,645
Join Date: Aug 2009
Location: oυτ o иoωнєяє

 
DONATE TO ME
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...