After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652290 - vte on interix
vte on interix
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.26.x
Other other
: Normal normal
: vte-0-32
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-06-10 13:49 UTC by Markus Duft
Modified: 2012-03-09 06:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vte build patch for interix (1015 bytes, patch)
2011-06-10 13:49 UTC, Markus Duft
none Details | Review
updated interix patch (1.13 KB, patch)
2011-08-17 07:00 UTC, Markus Duft
none Details | Review

Description Markus Duft 2011-06-10 13:49:51 UTC
Created attachment 189631 [details] [review]
vte build patch for interix

may i ask for a review of the attached patch? it makes vte build (and work, of course ;)) on interix.

the floor() check in configure.in is seemingly broken as it is (fixed by the patch), in that if floor() is only in -lm, HAVE_FLOOR is undefined, which is IMHO wrong.

additional to this patch, i need --disable-Bsymbolic and --disable-gnome-pty-helper for vte to build. but thats ok :)
Comment 1 Behdad Esfahbod 2011-06-11 03:13:36 UTC
Isn't your round() implementation wrong?  Should compare (x - floor(x) < .5), right?

I let ChPe figure out what the correct autoconf magic is.  I can't recall off the top of my head.
Comment 2 Christian Persch 2011-06-22 21:03:30 UTC
-AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
-AC_CHECK_FUNCS([ceil floor])
+AC_CHECK_LIB(m,floor,[LIBS="$LIBS -lm"; ac_cv_func_floor=yes])
+AC_CHECK_FUNCS([ceil floor round])

That's not quite equivalent to the previous code which only added -lm if linking to it is required to get floor, while now it's always added.

And yes, the floor impl is wrong.
Comment 3 Markus Duft 2011-06-27 09:38:31 UTC
the problem with the original code was:

 1) the floor check in -lm was ok, floor was found, HAVE_LIB_M_FLOOR (IIRC) defined
 2) the normal floor check went bad, and HAVE_FLOOR was left undefined.
 3) code didn't compile because HAVE_FLOOR is checked and undefined.

so in the end HAVE_FLOOR was undefined, but -lm was added to the link. Thinking about it the second check should have succeeded, because the first one adds -lm, right...? hmmm, but it didn't...

about the floor impl: ok, if it's wrong, i can turn it around. i just wanted to get it to work in the first place ;)
Comment 4 Christian Persch 2011-08-16 17:36:13 UTC
Any chance for an updated patch? :-)
Comment 5 Markus Duft 2011-08-17 05:44:39 UTC
is there some more insight into what would be the correct -lm check? i'm not sure whether what i'm doing is ok, yet the original version didn't add -lm although it was required...

anyway. i'm just about to look into it right now (although no time .... as always ;)). updated patch in a few minutes to hours.
Comment 6 Markus Duft 2011-08-17 05:45:32 UTC
err... darn. i meant it didn't find floor, not that it didn't add -lm
Comment 7 Markus Duft 2011-08-17 07:00:58 UTC
Created attachment 194010 [details] [review]
updated interix patch

here we go. is this one better? build goes through with it, and the check is now more like what was intended in the first place... :)
Comment 8 Christian Persch 2012-03-08 21:03:52 UTC
I committed a slightly different patch to vte-0-32 branch; can you check that it works for you?
Comment 9 Markus Duft 2012-03-09 06:34:17 UTC
oh, yeah, i will try :) it just may take some time, since i'm on something completely different at work now - 2 more months, then i'll be back on interix.