Opened 10 years ago

Closed 10 years ago

#40979 closed defect (fixed)

asymptote: fatal error: 'ext/slist' file not found

Reported by: ulrich.klauck@… Owned by: loshea@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: mavericks Cc: michaelbartz@…, papachoco (Carlos Sanchez), Schamschula (Marius Schamschula), dcecchin@…, flx.ms@…, mojca (Mojca Miklavec), mkae (Marko Käning)
Port: asymptote

Description (last modified by mojca (Mojca Miklavec))

Port does not install. Error message is:

/usr/bin/clang++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC  -D_THREAD_SAFE -pthread -DFFTWPP_SINGLE_THREAD -I/opt/local/include -pipe -Os -arch x86_64  -I . -I/opt/local/include/gc -I/usr/include/gc -o settings.o -c settings.cc
In file included from picture.cc:10:
In file included from ./picture.h:15:
In file included from ./drawelement.h:19:
In file included from ./prcfile.h:5:
In file included from ./prc/oPRCFile.h:41:
./prc/writePRC.h:29:10: fatal error: 'ext/slist' file not found
#include <ext/slist>
         ^

Attachments (14)

main.log (156.6 KB) - added by ulrich.klauck@… 10 years ago.
Portfile-asymptote.diff (1.1 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
Portfile-asymptote-2.28.diff (1.5 KB) - added by mojca (Mojca Miklavec) 10 years ago.
Update asymptote to 2.28 + other patches
asymptote-2.29.Portfile.diff (2.4 KB) - added by mojca (Mojca Miklavec) 10 years ago.
Update asymptote to 2.29 (might fix problem on 10.9?), remove dep on texlive (#43691)
asymptote-2.29.Portfile (3.4 KB) - added by mojca (Mojca Miklavec) 10 years ago.
Update asymptote to 2.29 (might fix problem on 10.9?), remove dep on texlive (#43691)
patch-genv.cc.diff (179 bytes) - added by mojca (Mojca Miklavec) 10 years ago.
a patch for 10.9: bits/stl_algo.h -> algorithm
patch-drawlabel.cc.diff (551 bytes) - added by mojca (Mojca Miklavec) 10 years ago.
another patch for 10.9
Portfile.asymptote-2.29.patches.diff (2.6 KB) - added by mf2k (Frank Schima) 10 years ago.
patch-config.h.in.diff (327 bytes) - added by mf2k (Frank Schima) 10 years ago.
patch-configure.ac.diff (459 bytes) - added by mf2k (Frank Schima) 10 years ago.
patch-configure.diff (531 bytes) - added by mf2k (Frank Schima) 10 years ago.
patch-drawlabel.cc.2.diff (551 bytes) - added by mf2k (Frank Schima) 10 years ago.
patch-genv.cc.2.diff (251 bytes) - added by mf2k (Frank Schima) 10 years ago.
patch-runlabel.in.diff (648 bytes) - added by mojca (Mojca Miklavec) 10 years ago.

Download all attachments as: .zip

Change History (41)

Changed 10 years ago by ulrich.klauck@…

Attachment: main.log added

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

Description: modified (diff)
Keywords: mavericks added
Owner: changed from macports-tickets@… to loshea@…
Summary: asymptote @2.16_2 +python27 darwin_13.x86_64asymptote @2.16_2 +python27: fatal error: 'ext/slist' file not found

comment:2 Changed 10 years ago by michaelbartz@…

Cc: michaelbartz@… added

Cc Me!

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

Cc: papachoco@… added

Has duplicate #41062.

comment:4 Changed 10 years ago by Schamschula (Marius Schamschula)

Cc: mschamschula@… added

Cc Me!

comment:5 Changed 10 years ago by ulrich.klauck@…

Hi guys,

I solved the problem for me by building asymptote from the source. There have been 3 problems:

  • Adding '-stdlib=libstdc++' to the CFLAGS solved the slist.h-problem. In Max OS X Apple obviously moved to the C++11 STL. This can be overriden with the above mentionned CFLAG.
  • The other two problems concern the preprocessor macros HAVE_LIBREADLINE and HAVE_LIBSIGSEGV in config.h. The configure script should be called with the option so that both are not defined. Maybe this holds true only for my particular system configuration. Since I am not well schooled in the structure of config.in files and configure scripts, as a quick (but dirty) solution I simply changed config.h

After applying these changes asymptote builds perfectly.

comment:6 Changed 10 years ago by dcecchin@…

Cc: dcecchin@… added

Cc Me!

comment:7 Changed 10 years ago by Schamschula (Marius Schamschula)

Just added the above mentioned CFLAGS to the Portfile and updated asymptote to version 2.25. Also had to add --disable-offscreen to configure.args as there is an issue with the MESA GLUT.

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-asymptote.diff added

comment:8 Changed 10 years ago by flx.ms@…

Cc: flx.ms@… added

Cc Me!

Thank you mschamschula! Your patch worked greatly out of the box for me: Asymptote compiled and installed without any errors and also passed some tests, I perforemd. OS X Mavericks 10.9.2 (13C64), Xcode 5.1.1 (5B1008). - Waited in vain for month for this update! (since I upgraded to Mavericks)

@Maintainer: How about creating an official update based on the proposed patch?

Cheers!

Last edited 10 years ago by flx.ms@… (previous) (diff)

comment:9 Changed 10 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

Changed 10 years ago by mojca (Mojca Miklavec)

Update asymptote to 2.28 + other patches

comment:10 Changed 10 years ago by mojca (Mojca Miklavec)

I think one can call this maintainer timeout. I'm ready to apply the patch, but the following line is weird:

configure.env       CFLAGS="-stdlib=libstdc++"

I don't have 10.9, so I would like to ask for confirmation that this is still needed. If it's still needed, we need to ask the upstream author for a fix.

comment:11 in reply to:  10 Changed 10 years ago by Schamschula (Marius Schamschula)

Replying to mojca@…:

I think one can call this maintainer timeout. I'm ready to apply the patch, but the following line is weird:

configure.env       CFLAGS="-stdlib=libstdc++"

I don't have 10.9, so I would like to ask for confirmation that this is still needed. If it's still needed, we need to ask the upstream author for a fix.

If you are using Xcode 5.1.x on 10.8 or 10.9 you will have this issue. It is not a problem for 10.7 or below.

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

I committed the rest in r120000, but I would like to explore if there is another ("proper") way for to fix this stdlib flag.

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

Can someone explain me why CFLAGS instead of CXXFLAGS?

I don't have 10.9 installed yet, but I'm curious to know whether the following blind fix would help. (Not a proper fix yet, but I want to know whether it works at all.)

  • prc/writePRC.h

    old new  
    2626#include <deque>
    2727#include <list>
    2828#ifdef __GNUC__
    29 #include <ext/slist>
     29#include <forward_list>
    3030#endif
    3131#include <map>
    3232#include <iostream>
    class PRCAttribute : public PRCAttributeEntry 
    225225  std::deque<PRCSingleAttribute> attribute_keys;
    226226};
    227227#ifdef __GNUC__
    228 typedef __gnu_cxx::slist<PRCAttribute> PRCAttributeList;
     228typedef std::forward_list<PRCAttribute> PRCAttributeList;
    229229#else
    230230typedef std::list<PRCAttribute> PRCAttributeList;
    231231#endif

http://stackoverflow.com/questions/19758400/ext-slist-file-not-found-on-os-x-10-9

Last edited 10 years ago by mojca (Mojca Miklavec) (previous) (diff)

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

A note to myself: a fix might need to include something like the following (but that still won't be the proper solution).

#include <ciso646>

#ifdef _LIBCPP_VERSION
#include <forward_list> // libc++
#else
#include <ext/slist>    // libstdc++
#endif

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

Description: modified (diff)
Summary: asymptote @2.16_2 +python27: fatal error: 'ext/slist' file not foundasymptote: fatal error: 'ext/slist' file not found
Version: 2.2.1

comment:16 Changed 10 years ago by mojca (Mojca Miklavec)

Unsuccessful attempt in r120065 (https://build.macports.org/builders/buildports-mavericks-x86_64/builds/3491)

I'm looking for testers to try out the latest version from SVN, please see:

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

I opened a port abandoned ticket (#43714).

Changed 10 years ago by mojca (Mojca Miklavec)

Update asymptote to 2.29 (might fix problem on 10.9?), remove dep on texlive (#43691)

Changed 10 years ago by mojca (Mojca Miklavec)

Attachment: asymptote-2.29.Portfile added

Update asymptote to 2.29 (might fix problem on 10.9?), remove dep on texlive (#43691)

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

I added a Portfile for version 2.29 and would like to ask 10.9 users for testing. I suspect there are still problems, but we need detailed reports to be able to fix the sources.

comment:19 Changed 10 years ago by mojca (Mojca Miklavec)

Cc: mk@… added

comment:20 Changed 10 years ago by mojca (Mojca Miklavec)

According to mf2k this is where it gets stuck now:

  • genv.cc:18:10: fatal error: 'bits/stl_algo.h' file not found
/usr/bin/clang++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC  -D_THREAD_SAFE -pthread -DFFTWPP_SINGLE_THREAD -I/opt/local/include -pipe -Os -arch x86_64  -I . -I/opt/local/include/gc -I/usr/include/gc -o genv.o -c genv.cc
In file included from runtimebase.in:1:
In file included from ./stack.h:13:
In file included from ./errormsg.h:12:
In file included from ./common.h:35:
In file included from ./memory.h:32:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ext/hash_map:212:5: warning: Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map> [-W#warnings]
#   warning Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>
    ^
In file included from env.cc:9:
In file included from ./env.h:12:
In file included from ./errormsg.h:12:
In file included from ./common.h:35:
In file included from ./memory.h:32:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ext/hash_map:212:5: warning: Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map> [-W#warnings]
#   warning Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>
    ^
genv.cc:18:10: fatal error: 'bits/stl_algo.h' file not found
#include <bits/stl_algo.h>
         ^
1 warning generated.

comment:21 Changed 10 years ago by mojca (Mojca Miklavec)

A patch has been applied upstream:

Feel free to test.

Changed 10 years ago by mojca (Mojca Miklavec)

Attachment: patch-genv.cc.diff added

a patch for 10.9: bits/stl_algo.h -> algorithm

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

comment:23 Changed 10 years ago by mojca (Mojca Miklavec)

As pointed out by mf2k, here's a discussion on the forum.

The binary builds, but hangs forever. Volunteers to debug the hanging asy welcome ;)

I'm also attaching another patch for testing.

Changed 10 years ago by mojca (Mojca Miklavec)

Attachment: patch-drawlabel.cc.diff added

another patch for 10.9

Changed 10 years ago by mf2k (Frank Schima)

Changed 10 years ago by mf2k (Frank Schima)

Attachment: patch-config.h.in.diff added

Changed 10 years ago by mf2k (Frank Schima)

Attachment: patch-configure.ac.diff added

Changed 10 years ago by mf2k (Frank Schima)

Attachment: patch-configure.diff added

Changed 10 years ago by mf2k (Frank Schima)

Attachment: patch-drawlabel.cc.2.diff added

Changed 10 years ago by mf2k (Frank Schima)

Attachment: patch-genv.cc.2.diff added

comment:24 Changed 10 years ago by mf2k (Frank Schima)

Here's latest attempt at the Portfile which hangs while building.

Changed 10 years ago by mojca (Mojca Miklavec)

Attachment: patch-runlabel.in.diff added

comment:25 Changed 10 years ago by mojca (Mojca Miklavec)

New patch patch-runlabel.in.diff​ (to be added to Portfile manually for now).

Edit: sorry, doesn't work.

Last edited 10 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:26 Changed 10 years ago by mojca (Mojca Miklavec)

The basic patch using libstdc++ committed in r120125. Follow up for libc++-related issues in ticket #43728.

comment:27 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.