Bug 32812 - ARCH=um, SUBARCH=i386: linking failure
Summary: ARCH=um, SUBARCH=i386: linking failure
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: XFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: XFS Guru
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 15:10 UTC by Martin Walch
Modified: 2012-04-07 14:03 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
config file in use (16.23 KB, text/plain)
2011-04-06 15:10 UTC, Martin Walch
Details

Description Martin Walch 2011-04-06 15:10:57 UTC
Created attachment 53672 [details]
config file in use

This seems to work fine with 2.6.27.58, but fails with 2.6.38.2 and 2.6.39-rc2:

$ make ARCH=um SUBARCH=i386
...
  LD      .tmp_vmlinux1
fs/built-in.o: In function `xlog_regrant_reserve_log_space':
xfs_log.c:(.text+0xd8584): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xd85ac): undefined reference to `cmpxchg8b_emu'
xfs_log.c:(.text+0xd85f0): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xd861c): undefined reference to `cmpxchg8b_emu'
xfs_log.c:(.text+0xd8685): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xd86b3): undefined reference to `cmpxchg8b_emu'
fs/built-in.o: In function `xlog_state_do_callback':
xfs_log.c:(.text+0xd8aac): undefined reference to `atomic64_set_386'
fs/built-in.o: In function `xlog_sync':
xfs_log.c:(.text+0xd8f34): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xd8f6d): undefined reference to `cmpxchg8b_emu'
xfs_log.c:(.text+0xd8fad): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xd8fe5): undefined reference to `cmpxchg8b_emu'
fs/built-in.o: In function `xlog_assign_tail_lsn':
(.text+0xd9510): undefined reference to `atomic64_read_386'
fs/built-in.o: In function `xlog_assign_tail_lsn':
(.text+0xd9528): undefined reference to `atomic64_set_386'
fs/built-in.o: In function `xlog_space_left':
xfs_log.c:(.text+0xda698): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xda6a6): undefined reference to `atomic64_read_386'
fs/built-in.o: In function `xfs_log_move_tail':
(.text+0xda759): undefined reference to `atomic64_read_386'
fs/built-in.o: In function `xfs_log_move_tail':
(.text+0xda77e): undefined reference to `atomic64_set_386'
fs/built-in.o: In function `xlog_ungrant_log_space':
xfs_log.c:(.text+0xda92d): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xda95e): undefined reference to `cmpxchg8b_emu'
xfs_log.c:(.text+0xda998): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xda9c6): undefined reference to `cmpxchg8b_emu'
fs/built-in.o: In function `xlog_alloc_log':
xfs_log.c:(.text+0xdab50): undefined reference to `atomic64_set_386'
xfs_log.c:(.text+0xdab5f): undefined reference to `atomic64_set_386'
xfs_log.c:(.text+0xdab78): undefined reference to `atomic64_set_386'
xfs_log.c:(.text+0xdab8a): undefined reference to `atomic64_set_386'
fs/built-in.o: In function `xlog_grant_push_ail':
xfs_log.c:(.text+0xdb0dc): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xdb10a): undefined reference to `atomic64_read_386'
fs/built-in.o: In function `xlog_regrant_write_log_space':
xfs_log.c:(.text+0xdb428): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xdb465): undefined reference to `cmpxchg8b_emu'
fs/built-in.o: In function `xlog_grant_log_space':
xfs_log.c:(.text+0xdb6c8): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xdb6fd): undefined reference to `cmpxchg8b_emu'
xfs_log.c:(.text+0xdb73d): undefined reference to `atomic64_read_386'
xfs_log.c:(.text+0xdb775): undefined reference to `cmpxchg8b_emu'
fs/built-in.o: In function `xlog_find_tail':
xfs_log_recover.c:(.text+0xdf4f9): undefined reference to `atomic64_set_386'
xfs_log_recover.c:(.text+0xdf51a): undefined reference to `atomic64_set_386'
xfs_log_recover.c:(.text+0xdf53e): undefined reference to `atomic64_set_386'
xfs_log_recover.c:(.text+0xdf565): undefined reference to `atomic64_set_386'
xfs_log_recover.c:(.text+0xdf5bb): undefined reference to `atomic64_read_386'
xfs_log_recover.c:(.text+0xdf677): undefined reference to `atomic64_set_386'
xfs_log_recover.c:(.text+0xdf68b): undefined reference to `atomic64_set_386'
fs/built-in.o:(.altinstr_replacement+0x4): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0xd): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x16): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x1f): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x24): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x2d): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x36): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x3b): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x40): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x45): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x4a): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x4f): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x54): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x5d): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x66): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x6b): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x70): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x75): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0x7a): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x7f): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x84): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x8d): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x96): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0x9f): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0xa4): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0xa9): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0xae): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0xb3): undefined reference to `atomic64_read_cx8'
fs/built-in.o:(.altinstr_replacement+0xb8): undefined reference to `atomic64_set_cx8'
fs/built-in.o:(.altinstr_replacement+0xbd): undefined reference to `atomic64_set_cx8'
...

$ gcc --version
gcc (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5
Comment 1 Dave Chinner 2011-04-07 04:14:18 UTC
(In reply to comment #0)
> Created an attachment (id=53672) [details]
> config file in use
> 
> This seems to work fine with 2.6.27.58, but fails with 2.6.38.2 and
> 2.6.39-rc2:
> 
> $ make ARCH=um SUBARCH=i386
> ...
>   LD      .tmp_vmlinux1
> fs/built-in.o: In function `xlog_regrant_reserve_log_space':
> xfs_log.c:(.text+0xd8584): undefined reference to `atomic64_read_386'
> xfs_log.c:(.text+0xd85ac): undefined reference to `cmpxchg8b_emu'

The architecture does not support the necesary 64 bit atomic operations. You need to report this to the UML maintainers for them to fix.

Perhaps you should try configuring the build for a more modern CPU, rather than i486.

> fs/built-in.o:(.altinstr_replacement+0xbd): undefined reference to
> `atomic64_set_cx8'

I don't think those are related in any way to XFS, but it's the same problem.

Cheers,

Dave.
Comment 2 Florian Mickler 2011-05-04 06:04:37 UTC
A patch referencing this bug report has been merged in v2.6.39-rc5-274-g609cfda:

commit 57d8e02e3cd21bccf2b84b26b42feb79e1f0f83e
Author: Richard Weinberger <richard@nod.at>
Date:   Wed Apr 27 15:26:51 2011 -0700

    um: mdd support for 64 bit atomic operations
Comment 3 Martin Walch 2012-04-07 14:03:59 UTC
Closing this bug, as it has been fixed long ago (2.6.38.5 and 2.6.39).

Richard Weinberger recommended to configure the UML kernel at least for Pentium Pro.

For details, take a look at the thread "Linux Kernel Bug #32812 "ARCH=um, SUBARCH=i386: linking failure" in the sourceforge mailing list archive:

> http://sourceforge.net/mailarchive/message.php?msg_id=27369868

Note You need to log in before you can comment on or make changes to this bug.