Modify

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8552 closed defect (duplicate)

e2fsck fails to link

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc: thomas@…

Description

it would appear that uClibc version of stdlib.h misses posix_memalign but that this it is not detected by the configure script.

I tried to edit the source code to force the use of memalign/valloc but the binding still failed, deleting the .so files did not work as they are not listed in the Makefile, so the file is not re-created.

If I am right, I would appreciate if someone could tell me how can I force the re-creation of the .so once the code has been "patched" by hand, please. so I can try to compile while a fix is in the work, thank you.

uname -a
Linux openwrtdev 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 i686 GNU/Linux
svn info
Path: .
URL: svn://svn.openwrt.org/openwrt/trunk
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 24854
Node Kind: directory
Schedule: normal
Last Changed Author: juhosg
Last Changed Rev: 24854
Last Changed Date: 2010-12-29 20:01:35 +0000 (Wed, 29 Dec 2010)
making all in e2fsck
make[6]: Entering directory `/home/thomas/openwrt-final/openwrt-trunk/build_dir/target-mips_uClibc-0.9.31/e2fsprogs-1.41.14/e2fsck'
	LD e2fsck
../lib/libext2fs.so: warning: the use of OBSOLESCENT `utime' is discouraged, use `utimes'
../lib/libext2fs.so: undefined reference to `posix_memalign'
collect2: ld returned 1 exit status
make[6]: *** [e2fsck] Error 1

Attachments (1)

config (57.1 KB) - added by thomas.mangin@… 7 years ago.
.config used

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by thomas.mangin@…

.config used

comment:1 Changed 7 years ago by Joe Roback <openwrt-devel@…>

http://wiki.openwrt.org/doc/devel/patches is how to use quilt to manage patches. It what OpenWRT uses, I'd suggest following that if you are considering submitting a patch... though, I believe uClibc has had posix_memalign() since 2007.. I not 100% on that, but a quick google search seem to indicate that. I would make sure it is just not a problem with the default uClibc configuration before trying to patch.. just my two cents.

comment:2 Changed 7 years ago by Thomas Mangin

uClib has it. it is enabled with UCLIBC_HAS_ADVANCED_REALTIME which is setup

grep UCLIBC_HAS_ADVANCED_REALTIME toolchain/uClibc/config-0.9.32/common
UCLIBC_HAS_ADVANCED_REALTIME=y

So something is not as it should :(

comment:3 Changed 7 years ago by TianHP

The patch resolves target compiling

svn diff ./toolchain/uClibc/config-0.9.31/common ./toolchain/uClibc/config-0.9.30.1/common >848-enable-posix_memalign.patch

cat 848-enable-posix_memalign.patch
Index: toolchain/uClibc/config-0.9.31/common
===================================================================
--- toolchain/uClibc/config-0.9.31/common (revision 24860)
+++ toolchain/uClibc/config-0.9.31/common (working copy)
@@ -82,7 +82,7 @@

UCLIBC_DYNAMIC_ATEXIT=y
UCLIBC_EXTRA_CFLAGS=""
UCLIBC_GRP_BUFFER_SIZE=256

-# UCLIBC_HAS_ADVANCED_REALTIME is not set
+UCLIBC_HAS_ADVANCED_REALTIME=y

# UCLIBC_HAS_ARC4RANDOM is not set
UCLIBC_HAS_BSD_ERR=y
UCLIBC_HAS_BSD_RES_CLOSE=y

Index: toolchain/uClibc/config-0.9.30.1/common
===================================================================
--- toolchain/uClibc/config-0.9.30.1/common (revision 24860)
+++ toolchain/uClibc/config-0.9.30.1/common (working copy)
@@ -78,7 +78,7 @@

UCLIBC_DYNAMIC_ATEXIT=y
UCLIBC_EXTRA_CFLAGS=""
UCLIBC_GRP_BUFFER_SIZE=256

-# UCLIBC_HAS_ADVANCED_REALTIME is not set
+UCLIBC_HAS_ADVANCED_REALTIME=y

# UCLIBC_HAS_ARC4RANDOM is not set
UCLIBC_HAS_BSD_ERR=y
UCLIBC_HAS_BSD_RES_CLOSE=y

comment:4 Changed 7 years ago by Thomas Mangin

Yes, I performed the grep against a version you already patched.. That was fast :) compiling ...

comment:5 Changed 7 years ago by Thomas Mangin

from a clean svn checkout, the compilation failed as the version of uClib used was not the one patched. I locally patched all the versions and I am re-compiling it all. It will take a few hours for the compilation to run tho. I will update the ticket.

comment:6 follow-up: Changed 7 years ago by anonymous

duplicate of #8550 , but better info ;-)

comment:7 Changed 7 years ago by Thomas Mangin

Compilation was successful once the right uClib was patched. The patch should be changed to include the other uClib version.
The patch updated 0.9.30.1 but the make used 0.9.31.

ls build_dir | grep uClib
target-mips_uClibc-0.9.31
toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.31
$ svn diff
Index: toolchain/uClibc/config-0.9.30.1/common
===================================================================
--- toolchain/uClibc/config-0.9.30.1/common	(revision 24860)
+++ toolchain/uClibc/config-0.9.30.1/common	(working copy)
@@ -78,7 +78,7 @@
 UCLIBC_DYNAMIC_ATEXIT=y
 UCLIBC_EXTRA_CFLAGS=""
 UCLIBC_GRP_BUFFER_SIZE=256
-# UCLIBC_HAS_ADVANCED_REALTIME is not set
+UCLIBC_HAS_ADVANCED_REALTIME=y
 # UCLIBC_HAS_ARC4RANDOM is not set
 UCLIBC_HAS_BSD_ERR=y
 UCLIBC_HAS_BSD_RES_CLOSE=y
Index: toolchain/uClibc/config-0.9.31/common
===================================================================
--- toolchain/uClibc/config-0.9.31/common	(revision 24860)
+++ toolchain/uClibc/config-0.9.31/common	(working copy)
@@ -82,7 +82,7 @@
 UCLIBC_DYNAMIC_ATEXIT=y
 UCLIBC_EXTRA_CFLAGS=""
 UCLIBC_GRP_BUFFER_SIZE=256
-# UCLIBC_HAS_ADVANCED_REALTIME is not set
+UCLIBC_HAS_ADVANCED_REALTIME=y
 # UCLIBC_HAS_ARC4RANDOM is not set
 UCLIBC_HAS_BSD_ERR=y
 UCLIBC_HAS_BSD_RES_CLOSE=y

comment:8 in reply to: ↑ 6 ; follow-up: Changed 7 years ago by Joe Roback <openwrt-devel@…>

Replying to anonymous:

duplicate of #8550 , but better info ;-)

They are not duplicates. #8550 is when the host does not support posix_memalign(), in which case e2fsprogs would need to be patched, #8552 is when the target e2fsprogs fails due to missing posix_memalign() because of uClibc configuration missing UCLIBC_HAS_ADVANCED_REALTIME.

Similar, but clearly not duplicates. #8552 solution doesn't fix #8550

comment:9 in reply to: ↑ 8 Changed 7 years ago by Joe Roback <openwrt-devel@…>

Replying to Joe Roback <openwrt-devel@…>:

Replying to anonymous:

duplicate of #8550 , but better info ;-)

They are not duplicates. #8550 is when the host does not support posix_memalign(), in which case e2fsprogs would need to be patched, #8552 is when the target e2fsprogs fails due to missing posix_memalign() because of uClibc configuration missing UCLIBC_HAS_ADVANCED_REALTIME.

Similar, but clearly not duplicates. #8552 solution doesn't fix #8550

argh.. please disregard, too early in the morning to think straight at the airport ;-) I was thinking about another ticket.. I didn't notice that 2 tickets for the target e2fsprogs were submitted..

comment:10 Changed 7 years ago by TianHP

I am sorry for crossing post.

I know #8550 and #8552 are different, as Joe Roback said "#8550 is when the host does not support posix_memalign(), in which case e2fsprogs would need to be patched, #8552 is when the target e2fsprogs fails due to missing posix_memalign() because of uClibc configuration missing UCLIBC_HAS_ADVANCED_REALTIME. "

I am using Ubuntu 10.10,so have no solution to #8550.

I just wanted to post the patch and then went to bed. I was so missing my bed after staying up for all night that I found the ticket that talks about e2fsprogs, then post, then my bed.

comment:11 Changed 7 years ago by robm

@Thomas

I made the 2 above changes in my build tree and then did make clean and make from trunk.
Same problems. Here is an grep -r REALTIME * (below)

Notice that the config-xxxx/.svn/text-base/common.svn-base still has these variables unset.

warning - this is my first build of openwrt so i don't know the system yet.
Rob

robm@oldster:~/Devel/openwrt/trunk/toolchain/uClibc$ grep -r REALTIME *

config-0.9.30.1/common:UCLIBC_HAS_ADVANCED_REALTIME =y
config-0.9.30.1/common:UCLIBC_HAS_REALTIME=y
config-0.9.30.1/ubicom32:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.30.1/.svn/text-base/ubicom32.svn-base:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.30.1/.svn/text-base/common.svn-base:# UCLIBC_HAS_ADVANCED_REALTIME is not set
config-0.9.30.1/.svn/text-base/common.svn-base:UCLIBC_HAS_REALTIME=y
config-0.9.31/common:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.31/common:UCLIBC_HAS_REALTIME=y
config-0.9.31/ubicom32:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.31/.svn/text-base/ubicom32.svn-base:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.31/.svn/text-base/common.svn-base:# UCLIBC_HAS_ADVANCED_REALTIME is not set
config-0.9.31/.svn/text-base/common.svn-base:UCLIBC_HAS_REALTIME=y
config-0.9.32/common:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.32/common:UCLIBC_HAS_REALTIME=y
config-0.9.32/.svn/text-base/common.svn-base:UCLIBC_HAS_ADVANCED_REALTIME=y
config-0.9.32/.svn/text-base/common.svn-base:UCLIBC_HAS_REALTIME=y
patches-0.9.31/450-powerpc_copysignl.patch: ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
patches-0.9.31/.svn/text-base/450-powerpc_copysignl.patch.svn-base: ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
patches-0.9.32/450-powerpc_copysignl.patch: ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
patches-0.9.32/.svn/text-base/450-powerpc_copysignl.patch.svn-base: ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)

comment:12 Changed 7 years ago by Thomas Mangin

I had to rebuild from a clean SVN checkout as it seems the .so are not rebuilt if deleted, the build script does not notice uClibc was changed. It takes ages but get you there.

comment:13 Changed 7 years ago by anonymous

No need to start from scratch the build is controlled by stamp files.
Just remove the appropriate stamp directory and build again.
Inside the stamp directory you will find a few hidden files, these files control what stage gets built.

Depending on your config you will see different stamp directories, use find to search for them all from your trunk.
I'm building for an AT91 and get the following:

./staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/stamp
./staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/root-at91/stamp
./staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/stamp
./staging_dir/host/stamp
./staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.31/stamp
./build_dir/target-arm_v5te_uClibc-0.9.31_eabi/stamp
./build_dir/host/stamp

comment:14 Changed 7 years ago by jow

  • Resolution set to duplicate
  • Status changed from new to closed

Dupe of #8550

comment:15 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.