Opened 11 years ago

Closed 11 years ago

#41218 closed defect (fixed)

fityk @1.2.1_1 +universal compile error - build failure

Reported by: uvw2@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: ryandesign (Ryan Carsten Schmidt), mojca (Mojca Miklavec)
Port: fityk

Description

The building of fityk failed in OS X 10.9.

...

:info:build In file included from GAfit.cpp:5:
:info:build In file included from ./GAfit.h:6:
:info:build In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:261:
:info:build In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:15:
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:644:97: error: invalid operands to binary expression ('const fityk::Remainder_and_ptr' and 'const fityk::Remainder_and_ptr')
:info:build     _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
:info:build                                                                                             ~~~ ^ ~~~

...

:info:build In file included from GAfit.cpp:5:
:info:build In file included from ./GAfit.h:6:
:info:build In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:261:
:info:build In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:15:
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:4606:9: error: no matching function for call to '__push_heap_front'
:info:build         __push_heap_front<_Compare>(__first, __last, __comp, __len-1);
:info:build         ^~~~~~~~~~~~~~~~~~~~~~~~~~~

...

Attachments (6)

main.log (152.5 KB) - added by uvw2@… 11 years ago.
cache.h.patch (563 bytes) - added by uvw2@… 11 years ago.
Fityk.log (140.0 KB) - added by laew_rena24@… 11 years ago.
fityk.diff (2.6 KB) - added by uvw2@… 11 years ago.
fityk.2.diff (3.2 KB) - added by mojca (Mojca Miklavec) 11 years ago.
some corrections to uvw2's patch
fityk.3.diff (3.2 KB) - added by mojca (Mojca Miklavec) 11 years ago.
some corrections to uvw2's patch

Download all attachments as: .zip

Change History (29)

Changed 11 years ago by uvw2@…

Attachment: main.log added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: nomaintainer@… removed
Keywords: mavericks added; Mavericks removed

You shouldn't have even been able to get to the point where fityk starts building, since its dependencies makeicns (#40869) and xylib (#41084) don't build on Mavericks yet either. How did you manage to build those dependencies?

comment:2 Changed 11 years ago by uvw2@…

I want to use fityk as soon as possible in mavericks. So, I have patched some files in /opt/local/var/macports/build/ to complete the installation of makeicns and xylib, when errors are happened.

xylib can be installed by using the folloing patch. However, I am not a developer, and I do not have any confidence with this patch.

*** /Users/xxxx/Downloads/cache.h       2013-11-07 09:19:38.000000000 +0900
--- xylib-1.2/xylib/cache.h     2013-11-07 09:28:23.000000000 +0900
***************
*** 28,34 ****
  #endif

  #if XYLIB_USE_TR1_MEMORY
! # include <tr1/memory>
    using std::tr1::shared_ptr;
  #else
  # include <boost/shared_ptr.hpp>
--- 28,34 ----
  #endif

  #if XYLIB_USE_TR1_MEMORY
! # include <boost/tr1/memory.hpp>
    using std::tr1::shared_ptr;
  #else
  # include <boost/shared_ptr.hpp>

makeicns can be installed by the patch "patch-IconFamily.m.diff" described in ticket #40869. Unfortunately, new revision of makeicns does not reflected repository, yet.

Anyhow, I have completed the installation of xylib and makeicns. I tried to compile fityk, but I cannot fix fityk.

Last edited 11 years ago by uvw2@… (previous) (diff)

comment:3 Changed 11 years ago by laew_rena24@…

Where do you download this patch? Because I patched the makeicns package and installed makeicns but xylib no yet…

Changed 11 years ago by uvw2@…

Attachment: cache.h.patch added

comment:4 Changed 11 years ago by uvw2@…

The official patch for xylib is not in repository. So, I made the patch for xylib to compile fityk, however I do not have any confidence with this patch. I attached the patch file (attachment:cache.h.patch). I used this as followings.

mymac:xylib-1.2 user $ patch -p1  < cache.h.patch
Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 in reply to:  4 Changed 11 years ago by laew_rena24@…

Replying to uvw2@…:

The official patch for xylib is not in repository. So, I made the patch for xylib to compile fityk, however I do not have any confidence with this patch. I attached the patch file (attachment:cache.h.patch). I used this as followings.

mymac:xylib-1.2 user $ patch -p1  < cache.h.patch

You patched the source code which you downloaded of the main page… Because I don't know if this patch could fix the problem in macports, I have installed the makeicns, only xylib package I couldn't install it … Well I didn't go back If I patched the xylib portfile in macports… didn't you?

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 11 years ago by mojca (Mojca Miklavec)

Based on what I see in attachment:cache.h.patch you might want to look into a similar patch for codeblocks: browser:trunk/dports/devel/codeblocks/files/patch-src-include-prep.h.diff?rev=111795 (#40515)

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Let's confine ourselves to only discussing fityk issues in this ticket. The makeicns and xylib issues have been addressed in their respective tickets.

comment:8 Changed 11 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:9 Changed 11 years ago by laew_rena24@…

Ok, I tried to install fityk in OS X 10.9 but the building failed … I attached the main.log

Changed 11 years ago by laew_rena24@…

Attachment: Fityk.log added

comment:10 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

I have posted a message about this problem in the fityk-users group but it hasn't shown up yet. Perhaps it is in a moderation queue and will be approved later.

comment:11 Changed 11 years ago by uvw2@…

I want to thank you all.

Original source in Github has been updated by the developer. So, I prepared the patch for Portfile, and fityk can be installed in mavericks. The patch (fityk.diff) is attached. If this patch is downloaded in ~/Downloads folder, you may be able to install fityk as followings.

cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/math/fityk
sudo patch -p1 < ~/Downloads/fityk.diff
sudo port install fityk

(In this patch, the problem (toolbar does not appear) may be fixed.)

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 11 years ago by uvw2@…

Attachment: fityk.diff added

comment:12 Changed 11 years ago by mojca (Mojca Miklavec)

It may work in Mavericks, but it fails on Lion.

In file included from view.cpp:6:
./common.h:231:14: error: use of undeclared identifier 'isfinite'; did you mean 'is_finite'?
    { return isfinite(a); }
             ^~~~~~~~
             is_finite
./common.h:228:13: note: 'is_finite' declared here
inline bool is_finite(double a)
            ^
In file included from logic.cpp:5:
In file included from ./logic.h:8:
In file included from ./mgr.h:9:
In file included from ./tplate.h:11:
./common.h:231:14: error: use of undeclared identifier 'isfinite'; did you mean 'is_finite'?
    { return isfinite(a); }
             ^~~~~~~~
             is_finite
./common.h:228:13: note: 'is_finite' declared here
inline bool is_finite(double a)
            ^
1 error generated.

Please ask the developers to fix this first.

comment:13 Changed 11 years ago by mojca (Mojca Miklavec)

I would also like to ask for explanation of why the patch that you attached wasn't included upstream and what it does. (Simply because I don't understand what the patch does and why it would be needed just in MacPorts.)

comment:14 Changed 11 years ago by mojca (Mojca Miklavec)

Here is one example of a patch for is_finite: https://github.com/nox/otp/compare/isfinite.patch

The following site (which might disappear in any moment) makes me believe that isfinite has only been added in 10.9 and the fact that finite is deprecated doesn't mean that fityk should suddenly stop working on anything < 10.9.

https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_8/OpenCL.html

comment:15 Changed 11 years ago by mojca (Mojca Miklavec)

comment:16 Changed 11 years ago by wojdyr@…

I'll fix the isfinite() issue upstream soon.

The patch for original problem (compilation error in GAfit.cpp) is here:

https://github.com/wojdyr/fityk/commit/658ec7e1b3b8b3b3b07008f2d125a1d8a2fd4e12

Changed 11 years ago by mojca (Mojca Miklavec)

Attachment: fityk.2.diff added

some corrections to uvw2's patch

Changed 11 years ago by mojca (Mojca Miklavec)

Attachment: fityk.3.diff added

some corrections to uvw2's patch

comment:17 Changed 11 years ago by mojca (Mojca Miklavec)

I did minor modifications and I can commit that, but it might be worth waiting for the author's response plus I'm still interested to know what patch-wxgui-frame.cpp.diff does.

comment:18 Changed 11 years ago by mojca (Mojca Miklavec)

Plus another question: does fityk +universal work now by any chance? It's not really clear to me whether the patch only solves compilation on 10.9 or if it actually solves the original reported problem. I'm not too eager to rebuild all the packages as universal now.

comment:19 Changed 11 years ago by laew_rena24@…

I want to said "thank you for this support" because this software is very important in DRX analysis…

Thanks…

comment:20 Changed 11 years ago by uvw2@…

I'm still interested to know what patch-wxgui-frame.cpp.diff does.

I built fityk in MacOS before, but toolbar icons don't appear. I found the information on the toolbar in web page ( https://groups.google.com/forum/#!msg/wx-dev/1JFQpbkqOn8/ksEfF7KInv4J ). Thus, I try to change the position of Realize() function, and it seems to work well.

comment:21 in reply to:  20 Changed 11 years ago by wojdyr@…

Replying to uvw2@…:

I built fityk in MacOS before, but toolbar icons don't appear. I found the information on the toolbar in web page ( https://groups.google.com/forum/#!msg/wx-dev/1JFQpbkqOn8/ksEfF7KInv4J ). Thus, I try to change the position of Realize() function, and it seems to work well.

FWIW I've just applied your patch upstream

comment:22 Changed 11 years ago by mojca (Mojca Miklavec)

Thank you. I committed r113668 (thanks to the quick reply without the need for any additional patches). The only thing I would like to know is whether +universal from the ticket name actually causes any issues; that is: can the ticket be closed now?

comment:23 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Yes, I confirmed fityk @1.2.1_3 builds +universal on Mavericks. Thanks everyone.

Note: See TracTickets for help on using tickets.