All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] lockfile-progs depends on liblockfile
@ 2011-03-08 14:22 Alexander Yohananov
  2011-03-08 14:36 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Yohananov @ 2011-03-08 14:22 UTC (permalink / raw)
  To: buildroot

Hi,

Compilation of lockfile-progs (which is one of dependencies of usbmount
that's what I actually need) ends up with the following errors:


>>> lockfile-progs 0.1.15 Extracting
>>> lockfile-progs 0.1.15 Patching package/lockfile-progs

Applying lockfile-progs-0.1.15-sus3v-legacy.patch using plaintext:
patching file lockfile-progs.c
Hunk #1 succeeded at 134 (offset 41 lines).
>>> lockfile-progs 0.1.15 Configuring
>>> lockfile-progs 0.1.15 Building
...
 ...
...
make[1]: Entering directory
`/home/sasha/violet/3party/buildroot/buildroot-2010.11/output/build/lockfile-progs-0.1.15'
/home/sasha/violet/3party/buildroot/buildroot-2010.11/output/staging/usr/bin/arm-unknown-linux-uclibc-gcc
--sysroot=/home/sasha/violet/3party/buildroot/buildroot-2010.11/output/staging
-pipe -Os -Os  -mtune=arm926ej-s -march=armv5te -mabi=apcs-gnu -msoft-float
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-I/home/sasha/violet/3party/buildroot/buildroot-2010.11/output/staging/usr/include
-I/home/sasha/violet/3party/buildroot/buildroot-2010.11/output/staging/include
  -c -o lockfile-progs.o lockfile-progs.c
lockfile-progs.c:19:22: error: lockfile.h: No such file or directory
lockfile-progs.c: In function 'get_status_code_string':
lockfile-progs.c:287: error: 'L_SUCCESS' undeclared (first use in this
function)
lockfile-progs.c:287: error: (Each undeclared identifier is reported only
once
lockfile-progs.c:287: error: for each function it appears in.)
lockfile-progs.c:291: error: 'L_NAMELEN' undeclared (first use in this
function)
lockfile-progs.c:295: error: 'L_TMPLOCK' undeclared (first use in this
function)
lockfile-progs.c:299: error: 'L_TMPWRITE' undeclared (first use in this
function)
lockfile-progs.c:303: error: 'L_MAXTRYS' undeclared (first use in this
function)
lockfile-progs.c:307: error: 'L_ERROR' undeclared (first use in this
function)
lockfile-progs.c: In function 'cmd_unlock':
lockfile-progs.c:322: error: 'L_SUCCESS' undeclared (first use in this
function)
lockfile-progs.c: In function 'cmd_lock':
lockfile-progs.c:331: error: 'L_PID' undeclared (first use in this function)
lockfile-progs.c:334: error: 'L_SUCCESS' undeclared (first use in this
function)
lockfile-progs.c: In function 'cmd_check':
lockfile-progs.c:366: error: 'L_PID' undeclared (first use in this function)
lockfile-progs.c: In function 'main':
lockfile-progs.c:377: error: 'L_SUCCESS' undeclared (first use in this
function)
make[1]: *** [lockfile-progs.o] Error 1


lockfile-progs obviously depends on liblockfile package, but
liblockfile.mklacks this definition.
The patch below fixed it to me:

--- a/lockfile-progs.mk 2011-03-08 15:40:51.145037713 +0200
+++ b/lockfile-progs.mk 2011-03-08 15:39:35.032038246 +0200
@@ -11,6 +11,8 @@
  $(addprefix lockfile-,check create remove touch) \
  $(addprefix mail-,lock touchlock unlock)

+LOCKFILE_PROGS_DEPENDENCIES = liblockfile
+
 define LOCKFILE_PROGS_BUILD_CMDS
  $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
 endef

The other possible fix is to add liblockfile to dependencies list in
usbmount.mk:
USBMOUNT_DEPENDENCIES = udev lockfile-progs liblockfile (I don't know
whether the order is important)

The problem exists on buildroot-2010.11, but since buildroot-2011.02
contains exactly the same usbmount, lockfile-progs and liblockfile it
apparently will appear there as well.

Best regards, Alexander.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110308/244a58eb/attachment.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] lockfile-progs depends on liblockfile
  2011-03-08 14:22 [Buildroot] lockfile-progs depends on liblockfile Alexander Yohananov
@ 2011-03-08 14:36 ` Thomas Petazzoni
  2011-03-08 15:10   ` Alexander Yohananov
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2011-03-08 14:36 UTC (permalink / raw)
  To: buildroot

Hello Alexander,

On Tue, 8 Mar 2011 16:22:57 +0200
Alexander Yohananov <yohananov@gmail.com> wrote:

> --- a/lockfile-progs.mk 2011-03-08 15:40:51.145037713 +0200
> +++ b/lockfile-progs.mk 2011-03-08 15:39:35.032038246 +0200
> @@ -11,6 +11,8 @@
>   $(addprefix lockfile-,check create remove touch) \
>   $(addprefix mail-,lock touchlock unlock)
> 
> +LOCKFILE_PROGS_DEPENDENCIES = liblockfile
> +
>  define LOCKFILE_PROGS_BUILD_CMDS
>   $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
>  endef

Correct. lockfile-progs already selects the liblockfile package in its
Config.in file, but does not depend on it in its .mk file, which is
wrong. Your fix is correct.

> The other possible fix is to add liblockfile to dependencies list in
> usbmount.mk:
> USBMOUNT_DEPENDENCIES = udev lockfile-progs liblockfile (I don't know
> whether the order is important)

No, that wouldn't work. By doing so, you wouldn't have the guarantee
that liblockfile is built before lockfile-progs, so the compilation of
the latter could still fail.

> The problem exists on buildroot-2010.11, but since buildroot-2011.02
> contains exactly the same usbmount, lockfile-progs and liblockfile it
> apparently will appear there as well.

Yes, this issue hasn't been fixed in the latest version.

Do you want to send a proper patch so we can keep your attribution, or
do you want me to send a patch, mentioning your name ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] lockfile-progs depends on liblockfile
  2011-03-08 14:36 ` Thomas Petazzoni
@ 2011-03-08 15:10   ` Alexander Yohananov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Yohananov @ 2011-03-08 15:10 UTC (permalink / raw)
  To: buildroot

Thomas,

It would great if I could send it by my own, but I'm not sure I know what "a
proper patch" looks like.
Do I need to prepare it using git diff as you do, or just diff is enough?
Will the directory structure be kept as in buildroot tree?
a/package/lockfile-progs/lockfile-progs.mk or a/lockfile-progs.mk will be
sufficient?

Could you guide me on it a little bit?

Thank you in advance, Alexander.



On Tue, Mar 8, 2011 at 4:36 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello Alexander,
>
> On Tue, 8 Mar 2011 16:22:57 +0200
> Alexander Yohananov <yohananov@gmail.com> wrote:
>
> > --- a/lockfile-progs.mk 2011-03-08 15:40:51.145037713 +0200
> > +++ b/lockfile-progs.mk 2011-03-08 15:39:35.032038246 +0200
> > @@ -11,6 +11,8 @@
> >   $(addprefix lockfile-,check create remove touch) \
> >   $(addprefix mail-,lock touchlock unlock)
> >
> > +LOCKFILE_PROGS_DEPENDENCIES = liblockfile
> > +
> >  define LOCKFILE_PROGS_BUILD_CMDS
> >   $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
> >  endef
>
> Correct. lockfile-progs already selects the liblockfile package in its
> Config.in file, but does not depend on it in its .mk file, which is
> wrong. Your fix is correct.
>
> > The other possible fix is to add liblockfile to dependencies list in
> > usbmount.mk:
> > USBMOUNT_DEPENDENCIES = udev lockfile-progs liblockfile (I don't know
> > whether the order is important)
>
> No, that wouldn't work. By doing so, you wouldn't have the guarantee
> that liblockfile is built before lockfile-progs, so the compilation of
> the latter could still fail.
>
> > The problem exists on buildroot-2010.11, but since buildroot-2011.02
> > contains exactly the same usbmount, lockfile-progs and liblockfile it
> > apparently will appear there as well.
>
> Yes, this issue hasn't been fixed in the latest version.
>
> Do you want to send a proper patch so we can keep your attribution, or
> do you want me to send a patch, mentioning your name ?
>
> Regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110308/f3107219/attachment-0001.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-08 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08 14:22 [Buildroot] lockfile-progs depends on liblockfile Alexander Yohananov
2011-03-08 14:36 ` Thomas Petazzoni
2011-03-08 15:10   ` Alexander Yohananov

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.