Bug 6692

Summary: GNU nano fails to compile for x86_64
Product: buildroot Reporter: Cassiano Martin <cassiano>
Component: OtherAssignee: Gustavo Zacarias <gustavo>
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2013.08   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Cassiano Martin 2013-11-14 11:43:31 UTC
GNU nano configure misdetect libmagic from somewhere. I'm not really sure what is going on, as I digged config.log it tries to link nano agains libmagic.so which is not provided byt buildroot. Most interesting is that is does no happen when compiling to x86 or mips64. Only x86_64 is affected. Same build host, same configuration.

I've fixed it by forcing autoconf env: NANO_CONF_ENV = ac_cv_lib_magic_magic_open=no

Then it builds fine.

Thanks
Comment 1 Gustavo Zacarias 2013-11-14 12:29:39 UTC
Thanks for the report.
Normally libmagic is provided by file, it's possible that your distribution libmagic is somehow leaking into the build.

Can you test what happens if you enable the file package and then build nano? (i can't reproduce it locally).
So as to make the workaround conditional on file being available or not.

Thanks.
Comment 2 Cassiano Martin 2013-11-14 16:22:41 UTC
Confirmed. I enabled file package and now nano compiles just fine. Somehow libmagic from my distribution is leaking into build, as you said.

And this is not the only one, libncursesw also leaked into the build, resulting into nano binary linked against it.

Thanks
Comment 3 Gustavo Zacarias 2013-11-14 16:50:31 UTC
The libncursesw failure was detected and fixed in http://git.buildroot.net/buildroot/commit/package/nano/nano.mk?id=f0801fa2f3e1cbd617bacef3b442da6914caae0a
Patch sent to the list about this issue, thanks.
Comment 4 Gustavo Zacarias 2013-11-28 11:56:17 UTC
Solved in commit 893108810b952777feca054a90c7ecfe7cad06e1 for the upcoming 2013.11 release.