bb33bb / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 1 forks source link

m4 macro is not able to auto-detect readline in cross-compiling environnement #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use a cross-compiling development
2. Attempt to build libnfc with pn53x-tamashell (which use readline)

What is the expected output? What do you see instead?
readline should be correctly detected but it use the host's files instead of 
the target ones.

This issue have been reported during Issue 174 solving:
http://code.google.com/p/libnfc/issues/detail?id=174#c13

/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetnum'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgoto'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetflag'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`BC'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tputs'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`PC'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetent'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`UP'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetstr'
collect2: ld returned 1 exit status
make[3]: *** [pn53x-tamashell] Error 1
make[3]: Leaving directory 
`/media/kdata/imx257/ltib/rpm/BUILD/libnfc-1.5.1/examples'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/media/kdata/imx257/ltib/rpm/BUILD/libnfc-1.5.1/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/kdata/imx257/ltib/rpm/BUILD/libnfc-1.5.1'
make: *** [all] Error 2
error: Bad exit status from /media/kdata/imx257/ltib/tmp/rpm-tmp.2457 (%build)

RPM build errors:
    Bad exit status from /media/kdata/imx257/ltib/tmp/rpm-tmp.2457 (%build)
Build time for libnfc: 11 seconds

Original issue reported on code.google.com by romu...@libnfc.org on 18 Oct 2011 at 12:45

GoogleCodeExporter commented 9 years ago
As first workaround, you could disable readline support (will affect only 
pn53x-tamashell) using the configure option:

./configure --with-readline=no

You could also pass directly the path where the target's readline is located: 
e.g.
./configure --with-readline=/path/to/the/toolchain/usr

(In this case, please be sure that readline is located in lib/ and include/ 
subdirs)

Original comment by romu...@libnfc.org on 18 Oct 2011 at 12:49

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 18 Oct 2011 at 1:30

GoogleCodeExporter commented 9 years ago
See r1177
This should ease the job...
readline support is now disabled when cross-compiling unless you specify full 
path to host libraries (--with-readline=/path/to/the/toolchain/usr)

Original comment by yob...@gmail.com on 18 Oct 2011 at 1:33