Skip to contentSkip to conversation

Problem to add DConf in buildroot

Buildroot Justin Mark 3 participants 5 messages Dec 11, 2010 – Dec 13, 2010

lore
Share & tools
lore
#0 lore raw

Hi

When I tried to add DConf into buildroot, I got the following error:

../client/libdconf.so.0: undefined reference to `posix_fallocate'
collect2: ld returned 1 exit status

but I can build DConf without any problems outside of buildroot.

In the Makefile.am, there's a line

dconf_LDADD = $(gio_LIBS) ../client/libdconf.so.0

It seems to me that a dependency of "../client/libdconf.so.0" is not in the path when I built under buildroot, if so, anyone has an idea how to patch the makefile, so I can build Dconf and link with libdconf.so.0

Many Thanks,
Justin

#1 lore raw

Le vendredi 10 d?cembre 2010 ? 22:24 -0800, Justin Mark a ?crit :

Quoted 9 lines

Hi

When I tried to add DConf into buildroot, I got the following error:

../client/libdconf.so.0: undefined reference to `posix_fallocate'
collect2: ld returned 1 exit status

but I can build DConf without any problems outside of buildroot.

Quoted 9 lines

In the Makefile.am, there's a line

dconf_LDADD = $(gio_LIBS) ../client/libdconf.so.0

It seems to me that a dependency of "../client/libdconf.so.0" is not in the path when I built under buildroot, if so, anyone has an idea how to patch the makefile, so I can build Dconf and link with libdconf.so.0

Many Thanks,
Justin

Hello Justin,

I think you need uclibc compiled with UCLIBC_HAS_ADVANCED_REALTIME option.

Regards,

--
Lionel Landwerlin

#2 lore raw

Hi Lionel,

Thanks a lot for the reply. I checked the uclibc config file, UCLIBC_HAS_ADVANCED_REALTIME was already turned on.

But I found a note in the file "uClibc_vs_SuSv3.txt":

Unimplemented optional interfaces:
----------------------------------
...
fcntl.h: posix_fallocate (depend on ADV)
...

so there's no implementation for posix_fallocate(). Since this function is only called once in Dconf, like this:
if (posix_fallocate (fd, 0, 1) == 0)

maybe I can patch the Dconf file, if anyone has an idea on how to replace the above code, please let me know.

Many thanks,
--Justin

Quoted 47 lines · Lionel Landwerlin

From: Lionel Landwerlin <[email protected]>
Subject: Re: [Buildroot] Problem to add DConf in buildroot
To: buildroot at busybox.net
Date: Saturday, December 11, 2010, 12:51 AM
Le vendredi 10 d?cembre 2010 ?
22:24 -0800, Justin Mark a ?crit :

Quoted 3 lines

Hi

When I tried to add DConf into buildroot, I got the

following error:

Quoted 2 lines

../client/libdconf.so.0: undefined reference to

`posix_fallocate'

Quoted 3 lines

collect2: ld returned 1 exit status

but I can build DConf without any problems outside of

buildroot.

Quoted 6 lines

In the Makefile.am, there's a line

dconf_LDADD = $(gio_LIBS) ../client/libdconf.so.0

It seems to me that a dependency of

"../client/libdconf.so.0" is not in the path when I built under buildroot, if so, anyone has an idea how to patch the makefile, so I can build Dconf and link with libdconf.so.0

Quoted 4 lines

Many Thanks,
Justin

Hello Justin,

I think you need uclibc compiled with
UCLIBC_HAS_ADVANCED_REALTIME
option.

Regards,

--
Lionel Landwerlin

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

Hello,

Quoted 6 lines · On Sat, 11 Dec 2010 19:37:36 -0800 (PST) Justin Mark <[email protected]> wrote:

so there's no implementation for posix_fallocate(). Since this function is only called once in Dconf, like this: if (posix_fallocate (fd, 0, 1) == 0)

maybe I can patch the Dconf file, if anyone has an idea on how to replace the above code, please let me know.

Just apply this patch from the DConf git repo, which removes posix_fallocate() and uses ftruncate() instead:

http://git.gnome.org/browse/dconf/commit/?id=e3dd1d8ac6839851cb3015e89cdf39ecb2e2b081

You can add this patch in package/dconf/, and mention in the patch comment that it is already upstreamed and therefore should be removed when DConf version is bumped.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

Hi Thomas,

Thanks for your email. After I apply the patches from DConf along with a patch I had made, I can build Dconf under buildroot now, I will submit the changes for review later.

Regards,
-Justin

Quoted 42 lines · Thomas Petazzoni

From: Thomas Petazzoni <[email protected]>
Subject: Re: [Buildroot] Problem to add DConf in buildroot
To: "Justin Mark" <[email protected]>
Cc: buildroot at busybox.net, "Lionel Landwerlin" <[email protected]>
Date: Sunday, December 12, 2010, 2:15 AM
Hello,

Quoted 1 line · On Sat, 11 Dec 2010 19:37:36 -0800 (PST) Justin Mark <[email protected]> wrote:

so there's no implementation for posix_fallocate().

Since this

Quoted 1 line

function is only called once in Dconf, like this: if

(posix_fallocate

Quoted 3 lines

(fd, 0, 1) == 0)

maybe I can patch the Dconf file, if anyone has an

idea on how to

Quoted 1 line

replace the above code, please let me know.

Just apply this patch from the DConf git repo, which removes
posix_fallocate() and uses ftruncate() instead:

http://git.gnome.org/browse/dconf/commit/?id=e3dd1d8ac6839851cb3015e89cdf39ecb2e2b081

You can add this patch in package/dconf/, and mention in the patch
comment that it is already upstreamed and therefore should be removed
when DConf version is bumped.

Regards,

Thomas

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