Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473724 - [PATCH?] =sys-kernel/gentoo-sources-3.8.13 - fs/built-in.o: In function `nfs_dns_resolve_name': (.text+0x1170cc): undefined reference to `dns_query'
Summary: [PATCH?] =sys-kernel/gentoo-sources-3.8.13 - fs/built-in.o: In function `nfs_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://git.kernel.org/cgit/linux/kern...
Whiteboard: linux-3.11
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-18 17:55 UTC by Jaime Martin
Modified: 2013-09-03 18:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Config used to compile kernel (config-bad,83.90 KB, text/x-mpsub)
2013-06-18 17:56 UTC, Jaime Martin
Details
patch for nfs dep on dns_resolver (nfs-dns_resolver-dep.patch,387 bytes, patch)
2013-06-25 18:42 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Martin 2013-06-18 17:55:54 UTC
I get a kernel compilation error with gentoo-sources-3.8.13 during a Gentoo Linux installation:

fs/built-in.o: In function `nfs_dns_resolve_name':
(.text+0x1170cc): undefined reference to `dns_query'
make: *** [vmlinux] Error 1 

The linker is trying to resolve a symbol called dns_query, a kernel option not selected. 

Reproducible: Always

Steps to Reproduce:
1. Chroot to a stage3 to install Gentoo Linux
2. emerge gentoo-sources
3. Try to compile linux kernel at first: 

$make && make modules_install

...
 LD      init/built-in.o
fs/built-in.o: In function `nfs_dns_resolve_name':
(.text+0x1170cc): undefined reference to `dns_query'
make: *** [vmlinux] Error 1 



Expected Results:  
Kernel compilation should work fine with stable gentoo-sources.

I attach the tested .config file
Comment 1 Jaime Martin 2013-06-18 17:56:34 UTC
Created attachment 351326 [details]
Config used to compile kernel
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-18 18:07:28 UTC
Thank you, I will try this soon.
Comment 3 Ben Kohler gentoo-dev 2013-06-25 18:42:46 UTC
Created attachment 351942 [details, diff]
patch for nfs dep on dns_resolver

If anyone wants to reproduce this, just start with unconfigured gentoo-sources-3.8.13, do "make menuconfig" and go mark CONFIG_NFS_V4 as modular, then save/exit, and make.

What seems to be going on is:  marking CONFIG_NFS_V4=m also selects CONFIG_DNS_RESOLVER=m, but it actually also causes the built-in CONFIG_NFS_FS=y (nfs.o) to use some functions (like dns_query) from the modular dns_resolv.o.

This dependency problem still exists in 3.9.7 but is harder to hit, since defconfig includes CONFIG_NFS_v4=y.  If you start with unconfigured 3.9.7 and use menuconfig to change to CONFIG_NFS_v4=m, then save/exit and make, you'll see the same problem.

I've attached a possible fix, but I'm no Kconfig guru so this could use a few eyes on it.  I does resolve the immediate dep problem, though.
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-27 11:30:12 UTC
Jaime, can you try his attached patch and let us know whether it works?

If it does, I'll look into this into more detail to embed it in genpatches and upstream it so they can fix it there as well.
Comment 5 Jaime Martin 2013-07-01 18:58:18 UTC
(In reply to Tom Wijsman (TomWij) from comment #4)
> Jaime, can you try his attached patch and let us know whether it works?
> 
> If it does, I'll look into this into more detail to embed it in genpatches
> and upstream it so they can fix it there as well.

I have tried the patch and works fine.
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-01 19:22:25 UTC
We still need to apply this ourselves or send this upstream; so, please don't mark it as resolved yet. Thank you in advance. :)
Comment 7 Mike Pagano gentoo-dev 2013-07-29 23:52:10 UTC
Tom, let me know if you sent this/are going to send this upstream.
Comment 8 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-03 17:48:20 UTC
(In reply to Mike Pagano from comment #7)
> Tom, let me know if you sent this/are going to send this upstream.

Filed upstream at https://bugzilla.kernel.org/show_bug.cgi?id=60841 and will apply this soon to genpatches.
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-03 18:36:31 UTC
This has been resolved in 3.11 due to commit c8d74d9b68b655e85ee4603f8918c3233a74f085.