* [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
@ 2012-02-24 17:16 Sebastian Andrzej Siewior
2012-02-24 17:16 ` [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID Sebastian Andrzej Siewior
2012-02-28 14:12 ` [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Karel Zak
0 siblings, 2 replies; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-02-24 17:16 UTC (permalink / raw)
To: util-linux; +Cc: Karel Zak, Sebastian Andrzej Siewior
This allows to building the package cross again. Since the return value
is not used I guess there is little loss.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
configure.ac | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index d3b298c..c27e890 100644
--- a/configure.ac
+++ b/configure.ac
@@ -387,6 +387,8 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier],
[scanf_cv_alloc_modifier=as],
[scanf_cv_alloc_modifier=no]
)
+ ,
+ [scanf_cv_alloc_modifier=no]
)
)
--
1.7.9
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID
2012-02-24 17:16 [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Sebastian Andrzej Siewior
@ 2012-02-24 17:16 ` Sebastian Andrzej Siewior
2012-02-28 14:35 ` Karel Zak
2012-02-28 14:12 ` [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Karel Zak
1 sibling, 1 reply; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-02-24 17:16 UTC (permalink / raw)
To: util-linux; +Cc: Karel Zak, Sebastian Andrzej Siewior
|ld: warning: libuuid.so.1, needed by ../libblkid/src/.libs/libblkid.so, not found (try using -rpath or -rpath-link)
|../libblkid/src/.libs/libblkid.so: undefined reference to `uuid_unparse@UUID_1.0'
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
config/include-Makefile.am | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/config/include-Makefile.am b/config/include-Makefile.am
index 29760d4..895d4bc 100644
--- a/config/include-Makefile.am
+++ b/config/include-Makefile.am
@@ -31,6 +31,9 @@ ul_libuuid_la = $(top_builddir)/libuuid/src/libuuid.la
$(ul_libuuid_la):
$(MAKE) -C $(ul_libuuid_builddir)
+if BUILD_LIBBLKID
+ ul_libblkid_la += $(ul_libuuid_la)
+endif
# mount
ul_libmount_srcdir = $(top_srcdir)/libmount/src
--
1.7.9
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID
2012-02-24 17:16 ` [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID Sebastian Andrzej Siewior
@ 2012-02-28 14:35 ` Karel Zak
2012-02-29 21:38 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 11+ messages in thread
From: Karel Zak @ 2012-02-28 14:35 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: util-linux
On Fri, Feb 24, 2012 at 06:16:08PM +0100, Sebastian Andrzej Siewior wrote:
> |ld: warning: libuuid.so.1, needed by ../libblkid/src/.libs/libblkid.so, not found (try using -rpath or -rpath-link)
> |../libblkid/src/.libs/libblkid.so: undefined reference to `uuid_unparse@UUID_1.0'
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> config/include-Makefile.am | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/config/include-Makefile.am b/config/include-Makefile.am
> index 29760d4..895d4bc 100644
> --- a/config/include-Makefile.am
> +++ b/config/include-Makefile.am
> @@ -31,6 +31,9 @@ ul_libuuid_la = $(top_builddir)/libuuid/src/libuuid.la
> $(ul_libuuid_la):
> $(MAKE) -C $(ul_libuuid_builddir)
>
> +if BUILD_LIBBLKID
I guess you mean "if BUILD_LIBUUID".
> + ul_libblkid_la += $(ul_libuuid_la)
> +endif
Hmm... I don't like this, it creates explicit dependence, libtool
should be smart enough to maintain dependencies dynamically.
We have libuuid.la in libblkid_la_LIBADD (see in libblkid/src/Makefile.am) and
on my system it generates the final libblkid.la with
# Libraries that this one depends upon.
dependency_libs='/home/projects/util-linux/util-linux/libuuid/src/libuuid.la'
It would be nice to know more details about your environment to
reproduce this problem. If I will be able to reproduce the problem
then I can also add regression test (for cross compiling).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID
2012-02-28 14:35 ` Karel Zak
@ 2012-02-29 21:38 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-02-29 21:38 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
* Karel Zak | 2012-02-28 15:35:37 [+0100]:
>> --- a/config/include-Makefile.am
>> +++ b/config/include-Makefile.am
>> @@ -31,6 +31,9 @@ ul_libuuid_la = $(top_builddir)/libuuid/src/libuuid.la
>> $(ul_libuuid_la):
>> $(MAKE) -C $(ul_libuuid_builddir)
>>
>> +if BUILD_LIBBLKID
>
> I guess you mean "if BUILD_LIBUUID".
I don't think so. Because if I build LIBBLKID it requires syms from
LIBUUID.
>> + ul_libblkid_la += $(ul_libuuid_la)
>> +endif
>
> Hmm... I don't like this, it creates explicit dependence, libtool
> should be smart enough to maintain dependencies dynamically.
>
> We have libuuid.la in libblkid_la_LIBADD (see in libblkid/src/Makefile.am) and
> on my system it generates the final libblkid.la with
>
> # Libraries that this one depends upon.
> dependency_libs='/home/projects/util-linux/util-linux/libuuid/src/libuuid.la'
>
>
> It would be nice to know more details about your environment to
> reproduce this problem. If I will be able to reproduce the problem
> then I can also add regression test (for cross compiling).
configured by
| $ ./configure --host=powerpc-linux-gnu --without-ncurses host_alias=powerpc-linux-gnu --no-create --no-recursion
according to config.log (everything starting with host_alias was not
added me). It is a cross compiler environment with no headers/libs. So
both libs (uuid and libblkid should be built by util-linux). After a
make I end up with:
|make[4]: Nothing to be done for `all-am'.
|make[4]: Leaving directory `/home/bigeasy/work/git/util-linux/libblkid/src'
|make[3]: Leaving directory `/home/bigeasy/work/git/util-linux/libblkid/src'
|Making all in samples
|make[3]: Entering directory `/home/bigeasy/work/git/util-linux/libblkid/samples'
| CCLD mkfs
|/usr/lib/gcc/powerpc-linux-gnu/4.4.5/../../../../powerpc-linux-gnu/bin/ld: warning: libuuid.so.1, needed by ../../libblkid/src/.libs/libblkid.so, not found (try using -rpath or -rpath-link)
|../../libblkid/src/.libs/libblkid.so: undefined reference to `uuid_unparse@UUID_1.0'
|collect2: ld returned 1 exit status
|make[3]: *** [mkfs] Error 1
>
> Karel
Sebastian
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-02-24 17:16 [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Sebastian Andrzej Siewior
2012-02-24 17:16 ` [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID Sebastian Andrzej Siewior
@ 2012-02-28 14:12 ` Karel Zak
2012-02-29 21:31 ` Sebastian Andrzej Siewior
1 sibling, 1 reply; 11+ messages in thread
From: Karel Zak @ 2012-02-28 14:12 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: util-linux
On Fri, Feb 24, 2012 at 06:16:07PM +0100, Sebastian Andrzej Siewior wrote:
> This allows to building the package cross again. Since the return value
> is not used I guess there is little loss.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> configure.ac | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index d3b298c..c27e890 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -387,6 +387,8 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier],
> [scanf_cv_alloc_modifier=as],
> [scanf_cv_alloc_modifier=no]
> )
> + ,
> + [scanf_cv_alloc_modifier=no]
> )
> )
Applied, thanks.
...but it means that you will compile the package without libmount.
Is it expected? In the next release fsck will depend on the library,
we have new mount and umount, ....
Is it really true that your glibc is without %as / %ms ?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-02-28 14:12 ` [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Karel Zak
@ 2012-02-29 21:31 ` Sebastian Andrzej Siewior
2012-03-20 8:18 ` Karel Zak
2012-03-30 19:49 ` Mike Frysinger
0 siblings, 2 replies; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-02-29 21:31 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
* Karel Zak | 2012-02-28 15:12:26 [+0100]:
>> @@ -387,6 +387,8 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier],
>> [scanf_cv_alloc_modifier=as],
>> [scanf_cv_alloc_modifier=no]
>> )
>> + ,
>> + [scanf_cv_alloc_modifier=no]
>> )
>> )
>
> Applied, thanks.
>
> ...but it means that you will compile the package without libmount.
> Is it expected? In the next release fsck will depend on the library,
> we have new mount and umount, ....
>
> Is it really true that your glibc is without %as / %ms ?
So I've been greping for have_scanf_alloc_modifier and did not find a
user. Well now that you mentioned, I see a user in configure.... So now
we need something like a proper fix hmm.... What about this:
- you don't want %as as it is non-standard evil
- %m is good enough an available since glibc 2.7. Why should someone
take old glibc (2.7 was released Thu Oct 18 00:09:32 2007 +0000) and
new util-linux?
- uClibc seems not to support it. The code seems to be behind an ifdef
and the define itseld is hidden in a comment
If this is okay then what about:
>From 921475f1b5f11699bc311c0f1c94d5da830edfd6 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 29 Feb 2012 22:26:19 +0100
Subject: [PATCH] build-sys: make the crosscompile path for
scanf_cv_alloc_modifier clever
My earlier assumption was that scanf_cv_alloc_modifier is unused. This
is not true as pointed out by Karel since it used befoe checking for
libmount. Argh. So instead saying no I add a test to check for glibc
>= 2.7 which provides %m. As of uClibc v0.9.32-rc3 the situation looks
the following:
| git grep _M_SPEC__
|libc/stdio/_vfprintf.c:/* #define __UCLIBC_HAS_PRINTF_M_SPEC__ */
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:# ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:# endif /* __UCLIBC_HAS_PRINTF_M_SPEC__ */
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/old_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/perror.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
And other libc user have to bring their own stuff.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
configure.ac | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index b40a636..0a3016b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -384,7 +384,23 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier],
[scanf_cv_alloc_modifier=no]
)
,
- [scanf_cv_alloc_modifier=no]
+
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <stdio.h>
+
+ #ifdef __GLIBC__
+
+ #if !(__GLIBC_PREREQ(2, 7))
+ #error %m is not available
+ #endif
+
+ #else
+
+ #error Your C-library is not supported.
+ #endif
+ ])],
+ [scanf_cv_alloc_modifier=ms],
+ [scanf_cv_alloc_modifier=no])]
)
)
--
1.7.9
Which results in:
| grep -E "%m|mount" log
|checking scanf string alloc modifiers... (%ms) yes
|config.status: creating libmount/Makefile
|config.status: creating libmount/docs/Makefile
|config.status: creating libmount/docs/version.xml
|config.status: creating libmount/mount.pc
|config.status: creating libmount/src/Makefile
|config.status: creating libmount/src/libmount.h
|config.status: creating mount/Makefile
>
> Karel
>
Sebastian
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-02-29 21:31 ` Sebastian Andrzej Siewior
@ 2012-03-20 8:18 ` Karel Zak
2012-03-30 19:49 ` Mike Frysinger
1 sibling, 0 replies; 11+ messages in thread
From: Karel Zak @ 2012-03-20 8:18 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: util-linux
On Wed, Feb 29, 2012 at 10:31:28PM +0100, Sebastian Andrzej Siewior wrote:
> configure.ac | 18 +++++++++++++++++-
> 1 files changed, 17 insertions(+), 1 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-02-29 21:31 ` Sebastian Andrzej Siewior
2012-03-20 8:18 ` Karel Zak
@ 2012-03-30 19:49 ` Mike Frysinger
2012-03-30 20:52 ` Mike Frysinger
1 sibling, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2012-03-30 19:49 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: Karel Zak, util-linux
[-- Attachment #1: Type: Text/Plain, Size: 781 bytes --]
On Wednesday 29 February 2012 16:31:28 Sebastian Andrzej Siewior wrote:
> My earlier assumption was that scanf_cv_alloc_modifier is unused. This
> is not true as pointed out by Karel since it used befoe checking for
> libmount. Argh. So instead saying no I add a test to check for glibc
> >= 2.7 which provides %m. As of uClibc v0.9.32-rc3 the situation looks
> the following:
the uClibc code you grepped for is printf("%m"), not scanf("%ms")
uClibc itself has a place holder for %as, but has never implemented it since
it conflicts with C99. and it hasn't gotten around to implementing the new %ms
which is specified by the latest POSIX spec.
be nice if this patch was in 2.21.1, but i guess that ship has sailed, and
there prob won't be a 2.21.2 ...
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-03-30 19:49 ` Mike Frysinger
@ 2012-03-30 20:52 ` Mike Frysinger
2012-04-02 7:14 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2012-03-30 20:52 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: Karel Zak, util-linux
[-- Attachment #1: Type: Text/Plain, Size: 246 bytes --]
On Friday 30 March 2012 15:49:37 Mike Frysinger wrote:
> be nice if this patch was in 2.21.1, but i guess that ship has sailed, and
> there prob won't be a 2.21.2 ...
blah nm. i was reading the wrong code base. 2.21.1 includes said fix.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-03-30 20:52 ` Mike Frysinger
@ 2012-04-02 7:14 ` Sebastian Andrzej Siewior
2012-04-02 19:00 ` Mike Frysinger
0 siblings, 1 reply; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-04-02 7:14 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Karel Zak, util-linux
On 03/30/2012 10:52 PM, Mike Frysinger wrote:
> On Friday 30 March 2012 15:49:37 Mike Frysinger wrote:
>> be nice if this patch was in 2.21.1, but i guess that ship has sailed, and
>> there prob won't be a 2.21.2 ...
>
> blah nm. i was reading the wrong code base. 2.21.1 includes said fix.
So there is nothing for me to do?
> -mike
Sebastian
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier
2012-04-02 7:14 ` Sebastian Andrzej Siewior
@ 2012-04-02 19:00 ` Mike Frysinger
0 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2012-04-02 19:00 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: Karel Zak, util-linux
On Mon, Apr 2, 2012 at 03:14, Sebastian Andrzej Siewior wrote:
> On 03/30/2012 10:52 PM, Mike Frysinger wrote:
>> On Friday 30 March 2012 15:49:37 Mike Frysinger wrote:
>>> be nice if this patch was in 2.21.1, but i guess that ship has sailed,
>>> and there prob won't be a 2.21.2 ...
>>
>> blah nm. i was reading the wrong code base. 2.21.1 includes said fix.
>
> So there is nothing for me to do?
sure, consider this follow up useless rambling and slight education,
but nothing actionable ;)
-mike
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-04-02 19:01 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 17:16 [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Sebastian Andrzej Siewior
2012-02-24 17:16 ` [PATCH 2/2] Add uuid to the linker flags if using built LIBBLKID Sebastian Andrzej Siewior
2012-02-28 14:35 ` Karel Zak
2012-02-29 21:38 ` Sebastian Andrzej Siewior
2012-02-28 14:12 ` [PATCH 1/2] conifigure: add a crosscompile path for scanf_cv_alloc_modifier Karel Zak
2012-02-29 21:31 ` Sebastian Andrzej Siewior
2012-03-20 8:18 ` Karel Zak
2012-03-30 19:49 ` Mike Frysinger
2012-03-30 20:52 ` Mike Frysinger
2012-04-02 7:14 ` Sebastian Andrzej Siewior
2012-04-02 19:00 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox