* Current media_build doesn't succeed building on kernel 3.1.10
@ 2012-09-30 18:52 Martin Burnicki
2012-10-01 14:02 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 7+ messages in thread
From: Martin Burnicki @ 2012-09-30 18:52 UTC (permalink / raw)
To: linux-media
Hi all,
is anybody out there who can help me with the media_build system? I'm trying
to build the current modules on an openSUSE 12.1 system (kernel 3.1.10,
x86_64), but I'm getting compilation errors because the s5k4ecgx driver uses
function devm_regulator_bulk_get() which AFAICS has been introduced in kernel
3.4 only. When I run the ./build script compilation stops with these
messages:
CC [M] /root/projects/media_build/v4l/s5k4ecgx.o
media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_load_firmware':
media_build/v4l/s5k4ecgx.c:346:2: warning: format '%d' expects argument of \
type 'int', but argument 4 has type 'size_t' [-Wformat]
media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_probe':
media_build/v4l/s5k4ecgx.c:977:2: error: implicit declaration of \
function 'devm_regulator_bulk_get' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
Probably I'll don't need module s5k4ecgx anyway, so any hint how to exclude
this from build would be fine.
On this page
http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers#Retrieving_and_Building.2FCompiling_the_Latest_V4L-DVB_Source_Code
the section "More Manually Intensive Approach" mentions steps where I can
run "make menuconfig" after unpacking the sources and before the build
process is started, so I could deselect the module(s) I don't need and
exclude them from build. However, I've no idea what I should use for "DIR="
in the command
make tar DIR=<some dir with media -git tree>
mentioned on the web page.
According to theis link
https://patchwork.kernel.org/patch/1267511/
the s5k4ecgx module which does not build here has just been added at the
beginning of August, so if I could specify a git version of the code which is
slightly older this might also work.
BTW, if I understand the build environment correctly then there should be
dayly test builds of the package for varions kernels. I'd expect those
automated builds should also fail for kernels older than 3.4.
Regards,
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Current media_build doesn't succeed building on kernel 3.1.10
2012-09-30 18:52 Current media_build doesn't succeed building on kernel 3.1.10 Martin Burnicki
@ 2012-10-01 14:02 ` Mauro Carvalho Chehab
2012-10-01 19:31 ` Martin Burnicki
0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-01 14:02 UTC (permalink / raw)
To: Martin Burnicki; +Cc: linux-media
Em Sun, 30 Sep 2012 20:52:42 +0200
Martin Burnicki <martin.burnicki@burnicki.net> escreveu:
> Hi all,
>
> is anybody out there who can help me with the media_build system? I'm trying
> to build the current modules on an openSUSE 12.1 system (kernel 3.1.10,
> x86_64), but I'm getting compilation errors because the s5k4ecgx driver uses
> function devm_regulator_bulk_get() which AFAICS has been introduced in kernel
> 3.4 only. When I run the ./build script compilation stops with these
> messages:
>
> CC [M] /root/projects/media_build/v4l/s5k4ecgx.o
> media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_load_firmware':
> media_build/v4l/s5k4ecgx.c:346:2: warning: format '%d' expects argument of \
> type 'int', but argument 4 has type 'size_t' [-Wformat]
> media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_probe':
> media_build/v4l/s5k4ecgx.c:977:2: error: implicit declaration of \
> function 'devm_regulator_bulk_get' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
Those are warnings. It wil compile if you disable -Werror=implicit-function-declaration.
>
>
> Probably I'll don't need module s5k4ecgx anyway, so any hint how to exclude
> this from build would be fine.
>
> On this page
> http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers#Retrieving_and_Building.2FCompiling_the_Latest_V4L-DVB_Source_Code
> the section "More Manually Intensive Approach" mentions steps where I can
> run "make menuconfig" after unpacking the sources and before the build
> process is started, so I could deselect the module(s) I don't need and
> exclude them from build. However, I've no idea what I should use for "DIR="
> in the command
>
> make tar DIR=<some dir with media -git tree>
>
> mentioned on the web page.
>
> According to theis link
> https://patchwork.kernel.org/patch/1267511/
> the s5k4ecgx module which does not build here has just been added at the
> beginning of August, so if I could specify a git version of the code which is
> slightly older this might also work.
>
> BTW, if I understand the build environment correctly then there should be
> dayly test builds of the package for varions kernels. I'd expect those
> automated builds should also fail for kernels older than 3.4.
>
>
> Regards,
>
> Martin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Regards,
Mauro
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Current media_build doesn't succeed building on kernel 3.1.10
2012-10-01 14:02 ` Mauro Carvalho Chehab
@ 2012-10-01 19:31 ` Martin Burnicki
2012-10-01 19:39 ` Mauro Carvalho Chehab
2012-10-02 1:30 ` Michael West
0 siblings, 2 replies; 7+ messages in thread
From: Martin Burnicki @ 2012-10-01 19:31 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media
Hi,
Mauro Carvalho Chehab wrote:
> Em Sun, 30 Sep 2012 20:52:42 +0200
>
> Martin Burnicki <martin.burnicki@burnicki.net> escreveu:
> > Hi all,
> >
> > is anybody out there who can help me with the media_build system? I'm
> > trying to build the current modules on an openSUSE 12.1 system (kernel
> > 3.1.10, x86_64), but I'm getting compilation errors because the s5k4ecgx
> > driver uses function devm_regulator_bulk_get() which AFAICS has been
> > introduced in kernel 3.4 only. When I run the ./build script compilation
> > stops with these messages:
> >
> > CC [M] /root/projects/media_build/v4l/s5k4ecgx.o
> > media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_load_firmware':
> > media_build/v4l/s5k4ecgx.c:346:2: warning: format '%d' expects argument
> > of \ type 'int', but argument 4 has type 'size_t' [-Wformat]
> > media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_probe':
> > media_build/v4l/s5k4ecgx.c:977:2: error: implicit declaration of \
> > function 'devm_regulator_bulk_get'
> > [-Werror=implicit-function-declaration] cc1: some warnings being treated
> > as errors
>
> Those are warnings. It wil compile if you disable
> -Werror=implicit-function-declaration.
Hm, yes. Even though the module would finally not load due to "missing
symbols" this won't matter since I don't need this module. So I suppose I
need something like
EXTRA_CFLAGS=-Wno-error=implicit-function-declaration
to let this be treated like a warning and thus the build process will
continue. However, I'm trying to use the ./build script from
git clone git://linuxtv.org/media_build.git
which seems to be best practice to get new modules added to an older kernel.
Can you or someone else tell me how to pass these EXTRA_CFLAGS to the ./build
script?
I've tried several ways without success.
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Current media_build doesn't succeed building on kernel 3.1.10
2012-10-01 19:31 ` Martin Burnicki
@ 2012-10-01 19:39 ` Mauro Carvalho Chehab
2012-10-02 1:30 ` Michael West
1 sibling, 0 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-01 19:39 UTC (permalink / raw)
To: Martin Burnicki; +Cc: linux-media
Em Mon, 1 Oct 2012 21:31:12 +0200
Martin Burnicki <martin.burnicki@burnicki.net> escreveu:
> Hi,
>
> Mauro Carvalho Chehab wrote:
> > Em Sun, 30 Sep 2012 20:52:42 +0200
> >
> > Martin Burnicki <martin.burnicki@burnicki.net> escreveu:
> > > Hi all,
> > >
> > > is anybody out there who can help me with the media_build system? I'm
> > > trying to build the current modules on an openSUSE 12.1 system (kernel
> > > 3.1.10, x86_64), but I'm getting compilation errors because the s5k4ecgx
> > > driver uses function devm_regulator_bulk_get() which AFAICS has been
> > > introduced in kernel 3.4 only. When I run the ./build script compilation
> > > stops with these messages:
> > >
> > > CC [M] /root/projects/media_build/v4l/s5k4ecgx.o
> > > media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_load_firmware':
> > > media_build/v4l/s5k4ecgx.c:346:2: warning: format '%d' expects argument
> > > of \ type 'int', but argument 4 has type 'size_t' [-Wformat]
> > > media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_probe':
> > > media_build/v4l/s5k4ecgx.c:977:2: error: implicit declaration of \
> > > function 'devm_regulator_bulk_get'
> > > [-Werror=implicit-function-declaration] cc1: some warnings being treated
> > > as errors
> >
> > Those are warnings. It wil compile if you disable
> > -Werror=implicit-function-declaration.
>
> Hm, yes. Even though the module would finally not load due to "missing
> symbols" this won't matter since I don't need this module. So I suppose I
> need something like
>
> EXTRA_CFLAGS=-Wno-error=implicit-function-declaration
>
> to let this be treated like a warning and thus the build process will
> continue. However, I'm trying to use the ./build script from
>
> git clone git://linuxtv.org/media_build.git
>
> which seems to be best practice to get new modules added to an older kernel.
> Can you or someone else tell me how to pass these EXTRA_CFLAGS to the ./build
> script?
>
> I've tried several ways without success.
It likely makes sense to modify the generated Makefile.media to disable the
"warnings being treated as errors" behavior that seems to be default on newer
distros.
Probably, all it needs is to modify this script:
v4l/scripts/make_makefile.pl
I'm very busy this week (merge window upstream). So, it is unlikely that
I'll find time to work on that, but feel free to do the changes and submit
us a patch for it.
Thanks!
Mauro
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Current media_build doesn't succeed building on kernel 3.1.10
2012-10-01 19:31 ` Martin Burnicki
2012-10-01 19:39 ` Mauro Carvalho Chehab
@ 2012-10-02 1:30 ` Michael West
2012-10-02 10:42 ` Michael West
1 sibling, 1 reply; 7+ messages in thread
From: Michael West @ 2012-10-02 1:30 UTC (permalink / raw)
To: Martin Burnicki, Mauro Carvalho Chehab; +Cc: linux-media@vger.kernel.org
Martin Burnicki <martin.burnicki@burnicki.net> wrote:
Hi,
>
> Mauro Carvalho Chehab wrote:
> > Em Sun, 30 Sep 2012 20:52:42 +0200
> >
> > Martin Burnicki <martin.burnicki@burnicki.net> escreveu:
> > > Hi all,
> > >
> > > is anybody out there who can help me with the media_build system?
> > > I'm trying to build the current modules on an openSUSE 12.1 system
> > > (kernel 3.1.10, x86_64), but I'm getting compilation errors because
> > > the s5k4ecgx driver uses function devm_regulator_bulk_get() which
> > > AFAICS has been introduced in kernel 3.4 only. When I run the
> > > ./build script compilation stops with these messages:
> > >
> > > CC [M] /root/projects/media_build/v4l/s5k4ecgx.o
> > > media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_load_firmware':
> > > media_build/v4l/s5k4ecgx.c:346:2: warning: format '%d' expects
> > > argument of \ type 'int', but argument 4 has type 'size_t'
> > > [-Wformat]
> > > media_build/v4l/s5k4ecgx.c: In function 's5k4ecgx_probe':
> > > media_build/v4l/s5k4ecgx.c:977:2: error: implicit declaration of \
> > > function 'devm_regulator_bulk_get'
> > > [-Werror=implicit-function-declaration] cc1: some warnings being
> > > treated as errors
> >
> > Those are warnings. It wil compile if you disable
> > -Werror=implicit-function-declaration.
>
> Hm, yes. Even though the module would finally not load due to "missing symbols" this won't matter since I don't need this module. So I suppose I need something like
>
> EXTRA_CFLAGS=-Wno-error=implicit-function-declaration
>
> to let this be treated like a warning and thus the build process will continue. However, I'm trying to use the ./build script from
>
> git clone git://linuxtv.org/media_build.git
>
> which seems to be best practice to get new modules added to an older kernel.
> Can you or someone else tell me how to pass these EXTRA_CFLAGS to the ./build script?
>
> I've tried several ways without success.
>
> Martin
>
I've had the same problem here trying to get it to run on 3.2 kernel Ubuntu 12.04. And new 3.4 and 3.5 kernels worked but I had other problems with stability so need this to build.
Watch out with that -Wno-error=implicit-function-declaration as it is not supported by gcc. The gcc documentation says there is no 'no-error' version of this warning option. So I'm not 100% sure how to turn these errors back into warnings.
Anyway I have found another quick solution to the problems that worked for me.
These are the steps I did:
Load up a terminal windows and start the build as normal. (you may want to start with a fresh media build folders)
git clone git://linuxtv.org/media_build.git
cd media_build
./build
Then as soon as it starts building .o files load a second terminal window and do the following:
cd media_build/v4l
nano s5k4ecgx.c
Now find the line with 'devm_regulator_bulk_get' function call and either comment or delete this line and the line below (it flows onto two lines)
Save this change and wait for the build to complete as normal
This is a very temp fix but it will at least let you build. If you run build again it will overwrite the s5k4ecgx.c file with the incompatible one.
If it's not a simple change to suppress these errors then it might be better to either patch s5k4ecgx.c or somewhere else to detect the kernel version and not compile those lines or the whole module.
Another option is to create a dummy function called 'devm_regulator_bulk_get' in a header somewhere.
And another simple solution is to create a diff patch to change those lines and stick that in the backports folder and set this to run on kernel 3.3 and older.
Hope this helps
Michael West
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Current media_build doesn't succeed building on kernel 3.1.10
2012-10-02 1:30 ` Michael West
@ 2012-10-02 10:42 ` Michael West
2012-10-02 10:49 ` Hans Verkuil
0 siblings, 1 reply; 7+ messages in thread
From: Michael West @ 2012-10-02 10:42 UTC (permalink / raw)
To: Michael West, Martin Burnicki, Mauro Carvalho Chehab
Cc: linux-media@vger.kernel.org
Was looking to make a better fix than trying to just remove that line while the Make was busy running so I made a quick simple backports patch.
This patch can be applied to the media_build git and it will remove the devm_regulator_bulk_get function call that is not supported in pre 3.4 kernels from s5k4ecgx.c. I'm sure there are better ways to fix this build problem but this seems to work for now anyway.
---
backports/backports.txt | 3 +++
backports/v3.3_s5k4ecgx.patch | 12 ++++++++++++
2 files changed, 15 insertions(+)
create mode 100644 backports/v3.3_s5k4ecgx.patch
diff --git a/backports/backports.txt b/backports/backports.txt
index 5554d9e..274945d 100644
--- a/backports/backports.txt
+++ b/backports/backports.txt
@@ -24,6 +24,9 @@
add api_version.patch
add pr_fmt.patch
+[3.3.255]
+add v3.3_s5k4ecgx.patch
+
[3.1.255]
add v3.1_no_export_h.patch
add v3.1_no_pm_qos.patch
diff --git a/backports/v3.3_s5k4ecgx.patch b/backports/v3.3_s5k4ecgx.patch
new file mode 100644
index 0000000..0e44163
--- /dev/null
+++ b/backports/v3.3_s5k4ecgx.patch
@@ -0,0 +1,12 @@
+diff -r drivers/media/i2c/s5k4ecgx.c
+--- a/drivers/media/i2c/s5k4ecgx.c 2012-10-02 15:32:07.309032679 +1300
++++ b/drivers/media/i2c/s5k4ecgx.c 2012-10-02 15:31:22.052994719 +1300
+@@ -974,8 +974,6 @@
+ for (i = 0; i < S5K4ECGX_NUM_SUPPLIES; i++)
+ priv->supplies[i].supply = s5k4ecgx_supply_names[i];
+
+- ret = devm_regulator_bulk_get(&client->dev, S5K4ECGX_NUM_SUPPLIES,
+- priv->supplies);
+ if (ret) {
+ dev_err(&client->dev, "Failed to get regulators\n");
+ goto out_err2;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Current media_build doesn't succeed building on kernel 3.1.10
2012-10-02 10:42 ` Michael West
@ 2012-10-02 10:49 ` Hans Verkuil
0 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2012-10-02 10:49 UTC (permalink / raw)
To: Michael West
Cc: Martin Burnicki, Mauro Carvalho Chehab,
linux-media@vger.kernel.org
On Tue 2 October 2012 12:42:10 Michael West wrote:
> Was looking to make a better fix than trying to just remove that line while the Make was busy running so I made a quick simple backports patch.
> This patch can be applied to the media_build git and it will remove the devm_regulator_bulk_get function call that is not supported in pre 3.4 kernels from s5k4ecgx.c. I'm sure there are better ways to fix this build problem but this seems to work for now anyway.
I've edited v4l/versions.txt to prevent this driver from being built on kernels
< 3.4. That should do the trick.
That change is now committed to media_build.
Regards,
Hans
> ---
> backports/backports.txt | 3 +++
> backports/v3.3_s5k4ecgx.patch | 12 ++++++++++++
> 2 files changed, 15 insertions(+)
> create mode 100644 backports/v3.3_s5k4ecgx.patch
>
> diff --git a/backports/backports.txt b/backports/backports.txt
> index 5554d9e..274945d 100644
> --- a/backports/backports.txt
> +++ b/backports/backports.txt
> @@ -24,6 +24,9 @@
> add api_version.patch
> add pr_fmt.patch
>
> +[3.3.255]
> +add v3.3_s5k4ecgx.patch
> +
> [3.1.255]
> add v3.1_no_export_h.patch
> add v3.1_no_pm_qos.patch
> diff --git a/backports/v3.3_s5k4ecgx.patch b/backports/v3.3_s5k4ecgx.patch
> new file mode 100644
> index 0000000..0e44163
> --- /dev/null
> +++ b/backports/v3.3_s5k4ecgx.patch
> @@ -0,0 +1,12 @@
> +diff -r drivers/media/i2c/s5k4ecgx.c
> +--- a/drivers/media/i2c/s5k4ecgx.c 2012-10-02 15:32:07.309032679 +1300
> ++++ b/drivers/media/i2c/s5k4ecgx.c 2012-10-02 15:31:22.052994719 +1300
> +@@ -974,8 +974,6 @@
> + for (i = 0; i < S5K4ECGX_NUM_SUPPLIES; i++)
> + priv->supplies[i].supply = s5k4ecgx_supply_names[i];
> +
> +- ret = devm_regulator_bulk_get(&client->dev, S5K4ECGX_NUM_SUPPLIES,
> +- priv->supplies);
> + if (ret) {
> + dev_err(&client->dev, "Failed to get regulators\n");
> + goto out_err2;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-10-02 10:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 18:52 Current media_build doesn't succeed building on kernel 3.1.10 Martin Burnicki
2012-10-01 14:02 ` Mauro Carvalho Chehab
2012-10-01 19:31 ` Martin Burnicki
2012-10-01 19:39 ` Mauro Carvalho Chehab
2012-10-02 1:30 ` Michael West
2012-10-02 10:42 ` Michael West
2012-10-02 10:49 ` Hans Verkuil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.