Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581112 - dev-lang/tk-8.6.5 cross compiling fails with "undefined reference to `fixstrtod'"
Summary: dev-lang/tk-8.6.5 cross compiling fails with "undefined reference to `fixstr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords: InVCS
: 581110 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-04-25 04:21 UTC by Peter Levine
Modified: 2017-01-18 07:06 UTC (History)
2 users (show)

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


Attachments
armv7a-hardfloat-linux-gnueabi-emerge --info (armv7a-hardfloat-linux-gnueabi-emerge-info.txt,14.99 KB, text/plain)
2016-04-25 04:23 UTC, Peter Levine
Details
dev-lang:tk-8.6.5:20160425-041856.log (dev-lang:tk-8.6.5:20160425-041856.log,211.24 KB, text/x-log)
2016-04-25 04:24 UTC, Peter Levine
Details
Patch for tk-8.6.5.ebuild (tk-8.6.5.ebuild.patch,509 bytes, patch)
2016-04-25 04:29 UTC, Peter Levine
Details | Diff
tk-8.6.6.ebuild.patch (tk-8.6.6.ebuild.patch,315 bytes, patch)
2016-08-28 20:17 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Levine 2016-04-25 04:21:48 UTC
Cross-compiling dev-lang/tk-8.6.5 (CBUILD="x86_64-pc-linux-gnu" CHOST="armv7a-hardfloat-linux-gnueabi") fails with "undefined reference to `fixstrtod'".
Comment 1 Peter Levine 2016-04-25 04:23:05 UTC
Created attachment 431860 [details]
armv7a-hardfloat-linux-gnueabi-emerge --info
Comment 2 Peter Levine 2016-04-25 04:24:04 UTC
Created attachment 431862 [details]
dev-lang:tk-8.6.5:20160425-041856.log
Comment 3 Peter Levine 2016-04-25 04:29:42 UTC
Created attachment 431864 [details, diff]
Patch for tk-8.6.5.ebuild

tcl-8.6.5.ebuild already includes the following in multilib_src_configure():

# We went ahead and deleted the whole compat/ subdir which means
# the configure tests to detect broken versions need to pass (else
# we'll fail to build).  This comes up when cross-compiling, but
# might as well get a minor configure speed up normally.
export ac_cv_func_memcmp_working="yes"
export tcl_cv_str{str,toul,tod}_unbroken="ok"
export tcl_cv_strtod_buggy="no"



dev-lang/tk also needs to export 'tcl_cv_strtod_buggy="no"' in multilib_src_configure() for the same reason.
Comment 4 Jonas Stein gentoo-dev 2016-04-26 22:09:33 UTC
*** Bug 581110 has been marked as a duplicate of this bug. ***
Comment 5 zlg (RETIRED) gentoo-dev 2016-08-24 09:44:07 UTC
(In reply to Peter Levine from comment #3)
> Created attachment 431864 [details, diff] [details, diff]
> Patch for tk-8.6.5.ebuild
> 
> tcl-8.6.5.ebuild already includes the following in multilib_src_configure():
> 
> # We went ahead and deleted the whole compat/ subdir which means
> # the configure tests to detect broken versions need to pass (else
> # we'll fail to build).  This comes up when cross-compiling, but
> # might as well get a minor configure speed up normally.
> export ac_cv_func_memcmp_working="yes"
> export tcl_cv_str{str,toul,tod}_unbroken="ok"
> export tcl_cv_strtod_buggy="no"
> 
> 
> 
> dev-lang/tk also needs to export 'tcl_cv_strtod_buggy="no"' in
> multilib_src_configure() for the same reason.

Sorry it's been so long for someone to get around to this. I tried your patch but I don't do cross-compilation. Can you confirm the patch allows tk to build *and* run on the intended target of a cross-compile? If so I'll go ahead and commit your proposed changes.
Comment 6 Peter Levine 2016-08-28 20:17:24 UTC
Created attachment 444348 [details, diff]
tk-8.6.6.ebuild.patch

(In reply to Daniel Campbell from comment #5)
> Sorry it's been so long for someone to get around to this. I tried your
> patch but I don't do cross-compilation. Can you confirm the patch allows tk
> to build *and* run on the intended target of a cross-compile? If so I'll go
> ahead and commit your proposed changes.

I'm not currently able to test outside of a static qemu at the moment.  A similar bug exists at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247.  For cross-compiling, Debian exports `ac_cv_func_strtod=yes` and `tcl_cv_strtod_buggy=1`.  That solution also fixes the build issue.

The only executable tk builds is `wish`.  Running it from a qemu chroot failed with something like:

> application-specific initialization failed: couldn't connect to display ":1"

which is expected. It doesn't segfault of show signs of ill-defined behavior.

This patch is based on the Debian solution and conditionally exports the variables only if cross-compiling. i.e:

>       if tc-is-cross-compiler ; then
>               export ac_cv_func_strtod=yes
>               export tcl_cv_strtod_buggy=1
>       fi
Comment 7 zlg (RETIRED) gentoo-dev 2016-08-31 22:15:41 UTC
I've added the patch to both 8.6.5-r1 and 8.6.6. Please pull and test at your convenience.

Commit-Hash: 45b3634f0a1923102fb657d69e81d4b07db12d1f
Comment 8 zlg (RETIRED) gentoo-dev 2017-01-18 07:06:41 UTC
tcl/tk 8.6.6 is stabilized. Marking as FIXED.