Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#54358 closed defect (fixed)

texlive-bin @2017 won't build on Snow Leopard, Mac OS X 10.6.8, because "A compiler with support for C++11 language features is required"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: mountain lion snowleopard leopard tiger Cc: Schamschula (Marius Schamschula), mojca (Mojca Miklavec)
Port: texlive-bin

Description

checking for gcc... (cached) /usr/bin/llvm-gcc-4.2
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/bin/llvm-gcc-4.2 accepts -g... (cached) yes
checking for /usr/bin/llvm-gcc-4.2 option to accept ISO C89... (cached) none needed
checking whether /usr/bin/llvm-gcc-4.2 understands -c and -o together... (cached) yes
checking for /usr/bin/llvm-gcc-4.2 option to accept ISO C99... -std=gnu99
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/llvm-g++-4.2 accepts -g... yes
checking dependency style of /usr/bin/llvm-g++-4.2... gcc3
checking what warning flags to pass to the C++ compiler... -Wimplicit -Wreturn-type -Wno-unknown-pragmas -Wno-write-strings
checking how to run the C++ preprocessor... /usr/bin/llvm-g++-4.2 -E
checking for ld used by /usr/bin/llvm-g++-4.2... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking whether the /usr/bin/llvm-g++-4.2 linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking for /usr/bin/llvm-g++-4.2 option to produce PIC... -fno-common -DPIC
checking if /usr/bin/llvm-g++-4.2 PIC flag -fno-common -DPIC works... yes
checking if /usr/bin/llvm-g++-4.2 static flag -static works... no
checking if /usr/bin/llvm-g++-4.2 supports -c -o file.o... yes
checking if /usr/bin/llvm-g++-4.2 supports -c -o file.o... (cached) yes
checking whether the /usr/bin/llvm-g++-4.2 linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features by default... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with -std=gnu++11... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with -std=gnu++0x... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with -std=c++11... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with +std=c++11... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with -h std=c++11... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with -std=c++0x... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with +std=c++0x... no
checking whether /usr/bin/llvm-g++-4.2 supports C++11 features with -h std=c++0x... no
configure: error: *** A compiler with support for C++11 language features is required.
=== configuring in dvisvgm failed
make[2]: *** [recurse] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk'

Attachments (3)

main.log (991.5 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
main.log with failure configuring dvisvgm
main.2.log (3.2 MB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
main.log from missing cstdint
main.3.log (1.4 MB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
main.log with failing XeTeX build

Change History (31)

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

main.log with failure configuring dvisvgm

comment:1 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

When I try to build TeX Live 2017 with (a patched version of) Clang 4.0 (see #) dvisvgm is configured, but then an error happens:

Making all in clipper
make[7]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/dvisvgm/dvisvgm-src/libs/clipper'
depbase=`echo clipper.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	/opt/local/bin/clang++-mp-4.0 -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../..   -isystem/opt/local/include -Wall -pipe -Os -stdlib=libstdc++ -arch x86_64 -MT clipper.o -MD -MP -MF $depbase.Tpo -c -o clipper.o clipper.cpp &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from clipper.cpp:41:
./clipper.hpp:55:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^~~~~~~~~
1 error generated.
make[7]: *** [clipper.o] Error 1
make[7]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/dvisvgm/dvisvgm-src/libs/clipper'

The missing file seems to exist:

-rw-r--r--  1 macports  admin  2785 17 Okt  2011 /opt/local/libexec/llvm-4.0/lib/c++/v1/cstdint

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

main.log from missing cstdint

comment:2 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

With GCC 6 the build fails with XeTeX:

/bin/sh ./libtool  --tag=CC   --mode=link /opt/local/bin/gcc-mp-6 -Wimplicit -Wreturn-type -pipe -Os -m64  -Wl,-headerpad_max_install_names -o euptex euptexdir/euptex-euptexextra.o synctexdir/euptex-synctex.o euptex-euptexini.o euptex-euptex0.o euptex-euptex-pool.o libukanji.a lib/libp.a /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/ptexenc/libptexenc.la lib/lib.a /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/kpathsea/libkpathsea.la  libmd5.a -lz 
libtool: link: /opt/local/bin/gcc-mp-6 -Wimplicit -Wreturn-type -pipe -Os -m64 -Wl,-headerpad_max_install_names -o .libs/euptex euptexdir/euptex-euptexextra.o synctexdir/euptex-synctex.o euptex-euptexini.o euptex-euptex0.o euptex-euptex-pool.o  libukanji.a lib/libp.a /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/ptexenc/.libs/libptexenc.dylib lib/lib.a /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/kpathsea/.libs/libkpathsea.dylib libmd5.a -lz
mv -f xetexdir/.deps/libxetex_a-pdfimage.Tpo xetexdir/.deps/libxetex_a-pdfimage.Po
mv -f xetexdir/.deps/libxetex_a-XeTeX_mac.Tpo xetexdir/.deps/libxetex_a-XeTeX_mac.Po
mv -f xetexdir/.deps/libxetex_a-hz.Tpo xetexdir/.deps/libxetex_a-hz.Po
mv -f xetexdir/.deps/libxetex_a-XeTeXFontInst_Mac.Tpo xetexdir/.deps/libxetex_a-XeTeXFontInst_Mac.Po
In file included from /System/Library/Frameworks/Security.framework/Headers/Security.h:57:0,
                 from /System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:14,
                 from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:79,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from xetexdir/XeTeXFontMgr_Mac.mm:44:
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:102:46: error: shift expression '(1853123693 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeNTLM             = AUTH_TYPE_FIX_ ('ntlm'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:102:46: error: enumerator value for 'kSecAuthenticationTypeNTLM' is not an integer constant
     kSecAuthenticationTypeNTLM             = AUTH_TYPE_FIX_ ('ntlm'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:103:46: error: shift expression '(1836281441 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeMSN              = AUTH_TYPE_FIX_ ('msna'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:103:46: error: enumerator value for 'kSecAuthenticationTypeMSN' is not an integer constant
     kSecAuthenticationTypeMSN              = AUTH_TYPE_FIX_ ('msna'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:104:46: error: shift expression '(1685086561 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeDPA              = AUTH_TYPE_FIX_ ('dpaa'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:104:46: error: enumerator value for 'kSecAuthenticationTypeDPA' is not an integer constant
     kSecAuthenticationTypeDPA              = AUTH_TYPE_FIX_ ('dpaa'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:105:46: error: shift expression '(1919967585 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeRPA              = AUTH_TYPE_FIX_ ('rpaa'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:105:46: error: enumerator value for 'kSecAuthenticationTypeRPA' is not an integer constant
     kSecAuthenticationTypeRPA              = AUTH_TYPE_FIX_ ('rpaa'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:106:46: error: shift expression '(1752462448 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeHTTPBasic        = AUTH_TYPE_FIX_ ('http'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:106:46: error: enumerator value for 'kSecAuthenticationTypeHTTPBasic' is not an integer constant
     kSecAuthenticationTypeHTTPBasic        = AUTH_TYPE_FIX_ ('http'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:107:46: error: shift expression '(1752462436 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeHTTPDigest       = AUTH_TYPE_FIX_ ('httd'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:107:46: error: enumerator value for 'kSecAuthenticationTypeHTTPDigest' is not an integer constant
     kSecAuthenticationTypeHTTPDigest       = AUTH_TYPE_FIX_ ('httd'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:108:46: error: shift expression '(1718579821 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeHTMLForm         = AUTH_TYPE_FIX_ ('form'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:108:46: error: enumerator value for 'kSecAuthenticationTypeHTMLForm' is not an integer constant
     kSecAuthenticationTypeHTMLForm         = AUTH_TYPE_FIX_ ('form'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:109:46: error: shift expression '(1684434036 << 8)' overflows [-fpermissive]
     kSecAuthenticationTypeDefault          = AUTH_TYPE_FIX_ ('dflt'),
                                              ^
/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:109:46: error: enumerator value for 'kSecAuthenticationTypeDefault' is not an integer constant
     kSecAuthenticationTypeDefault          = AUTH_TYPE_FIX_ ('dflt'),
                                              ^
make[5]: *** [xetexdir/libxetex_a-XeTeXFontMgr_Mac.o] Error 1
make[5]: *** Waiting for unfinished jobs....
mv -f .deps/pdftex-pdftex0.Tpo .deps/pdftex-pdftex0.Po
mv -f .deps/aleph-aleph0.Tpo .deps/aleph-aleph0.Po
make[5]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/web2c'

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.3.log added

main.log with failing XeTeX build

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Cc: dports@… removed
Owner: set to drkp
Status: newassigned

comment:4 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

I forgot to mention the origin of the Clang 4.0 patches: #54135.

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

Cc: Schamschula added

comment:6 Changed 7 years ago by kencu (Ken)

it built through to completion on 10.6.8 with clang-3.9 (my current default compiler on Snow Leopard).

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

Keywords: leopard tiger added

Needless to say, Leopard (10.5.8 PPC) build is also rather broken.

I ended up uninstalling relive-bin, as there were no direct dependents installed on my machine.

I suspect, that I'll be caught by a build dependency in the near future...

comment:8 in reply to:  6 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

it built through to completion on 10.6.8 with clang-3.9 (my current default compiler on Snow Leopard).

With Clang 3.9 (port -vd upgrade texlive-bin configure.compiler=macports-clang-3.9) I get:

Making all in clipper
make[7]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/dvisvgm/dvisvgm-src/libs/clipper'
depbase=`echo clipper.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	/opt/local/bin/clang++-mp-3.9 -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../..   -isystem/opt/local/include -Wall -pipe -Os -stdlib=libstdc++ -arch x86_64 -MT clipper.o -MD -MP -MF $depbase.Tpo -c -o clipper.o clipper.cpp &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from clipper.cpp:41:
./clipper.hpp:55:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^
1 error generated.
make[7]: *** [clipper.o] Error 1
make[7]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_texlive-bin/texlive-bin/work/texlive-source-20170604-stripped/texk/dvisvgm/dvisvgm-src/libs/clipper'

comment:9 Changed 7 years ago by kencu (Ken)

Ah. I think this is because I used libc++, and so I get -stdlib=libc++ on the build line. Your build line is showing -stdlib=libstdc++, and that won't work because it has no c++11 support. You need to have -stdlib=macports-libstdc++ on the build line.

In your case, the easiest thing to do would be to add Portgroup cxx11 1.1 up near the top of the file, which should take care of properly setting up Marcus' tricks for you.

comment:10 in reply to:  9 ; Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

Ah. I think this is because I used libc++, and so I get -stdlib=libc++ on the build line. Your build line is showing -stdlib=libstdc++, and that won't work because it has no c++11 support. You need to have -stdlib=macports-libstdc++ on the build line.

How does it look technically with that undocumented (man port) "-stdlib=macports-libstdc++ on the build line?" Is it then this invocation?

port -stdlib=macports-libstdc++ -vd upgrade texlive-bin configure.compiler=macports-clang-3.9 

In your case, the easiest thing to do would be to add Portgroup cxx11 1.1 up near the top of the file, which should take care of properly setting up Marcus' tricks for you.

I'll add this statement on line #6 in texlive-bin Portfile. And hopefully texlive-bin @2016+x11 will rebuild because poppler was upgraded to a new version…

comment:11 in reply to:  10 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

  6 PortGroup       cxx11 1.1

in texlive-bin's Portfile allowed that rev-upgrade to succeed. Now I only need to patch 26 Portfiles…

comment:12 Changed 7 years ago by kencu (Ken)

The cxx11 1.1 portgroup does basically three things:

  1. specify a suitable compiler
  2. set up clang to use -stdlib=macports-libstdc++, which does some behind the scene things in clang's choice of include directories and linkages
  3. set the ABI compatibility mode for libgcc to ABI4, so the software is compatible with the other things built against the system's libstdc++.

You'd have to do all these things manually to make it work correctly, so it's best to just use the cxx11 portgroup. Or use libc++ instead, which is what I do (LibcxxOnOlderSystems).

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

I think you only need to fix something in texlive-bin, I doubt that other files need a fix.

A different patch could be to add --disable-dvisvgm to configure flags and then potentially install the latest version of dvisvgm separately. This might be of temporary nature though since ICU also requires C++11 from what I remember.

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

Cc: mojca added

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

Keywords: mountain lion added

We need a separate new keyword for C++11 :)

comment:16 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

My experience with cxx11-1.1.tcl and texlive-bin's Portfile is rather bad. Neither on PPC Tiger, Mac OS X 10.4.11, nor on PPC Leopard, Mac OS X 10.5.8, the settings in cxx11-1.1.tcl are able to override those in Portfile – assuming it's not necessary to add a line

PortGroup       cxx11 1.1

to Portfile. The builds only then succeeded when "texlive-bin" and "configure.compiler=macports-gcc-6" where the only arguments to port « options » upgrade. Maybe GCC 5 can as well build the port successfully. I'll try that next time when the automatic upgrade of texlive-bin will fail automatically again.

comment:17 Changed 7 years ago by kencu (Ken)

Although trying to monkey around a way through this is an interesting intellectual exercise at times, my real, practical, and workable recommendation for you is to follow the instructions in the LibcxxOnOlderSystems page to bring your 10.6 system up to current standards with libc++ and a current compiler (presently clang-3.8 or clang-3.9 seem to be ideal on 10.6). This will solve this and all similar issues for you, pretty much forever. Jeremy did a lot of work on this for exactly this reason, and it makes life much easier on 10.6 to 10.8. I wouldn't ignore it. It is exactly what I did, and it works very very well. I highly recommend it.

There are still occasional issues on 10.6 with deficiencies in libc (most of them fixed with my snowleopardfixes library), deficiencies in the SDK (no good way around those), deficiencies in thread-local-storage (again, you're hooped there unless you can get away with using gcc6 which supports TLS on 10.6, and hoping for no ABI issues), and deficiencies with ports that use xcodebuild (which I haven't yet figured a way around, but might someday get to).

For 10.5 PPC, I'm working on it. Clang-3.8 is working nicely, and looks to be successfully building almost everything. It can link against libc++ on 10.5 PPC, and also against libstdc++ and gcc6's libsdtc++. There is also gcc6, which has some ABI issues, but looks like there are ways around that...

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:18 Changed 7 years ago by kencu (Ken)

see [13d702e7643b9545a76d2d3b8b9046e9b5891158/macports-ports] which might have fixed this in one fashion.

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

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

Wait ... are you saying that blacklisting the default compiler was enough for making dvisvgm build work? No libc++?

comment:20 Changed 7 years ago by kencu (Ken)

Apparently that is what Jeremy found. However, while admitting Jeremy knows all and I know very litte, might I make an argument:

  1. A 10.4 to 10.8 user is undoubtedly going to run across a port that needs the cxx11 PortGroup soon enough, so all the infrastructure for that is going to be installed sooner rather than later.
  2. Nobody wants 5 different 200MB compilers with 200MB llvm versions to support them.
  3. It takes time to sort out just which version of clang is "good enough" for the given port.
  4. The cxx11 1.1 PortGroup can also do other good stuff for free (like fix it for all PPC machines for example).

So - if I run across this kind of issue, it is very tempting to just add in the cxx11 1.1 PortGroup as step 1 of the process, and if that fixes it (which it almost always will), then you're done in 10 seconds + build time.

The only thing I might add to the cxx11 1.1 PortGroup is a blacklist on all clang versions < about clang-3.8 for the libc++ section -- and even there, it might be best to leave the stock clangs for 10.10 and up, and lead everyone else onto clang-3.9.

The more homeogeneous and consistent the group is, the easier it is to support the herd.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:21 in reply to:  19 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to mojca:

Wait ... are you saying that blacklisting the default compiler was enough for making dvisvgm build work? No libc++?

Sorry! After two weeks and in-between migrating to a setup with cxx_stdlib = libc++ for some hundred ports I don't remember for sure. I think I only had to ensure that Clang 3.9 was used.

comment:22 Changed 7 years ago by kencu (Ken)

Note: a PR is in place to fix this <https://github.com/macports/macports-ports/pull/639>.

comment:23 Changed 7 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 2b1e49d05cd18b699f4fb1faf0b9f6c4890c3906/macports-ports:

texlive-bin: add cxx11 1.1 PortGroup

fixes build on older systems
still need to specificy clang > 500 however
can delete other compiler blacklisting as that is

now handled by cxx11 1.1 PortGroup

closes: #54358
closes: #54374
closes: #54475

comment:24 Changed 7 years ago by mojca (Mojca Miklavec)

The irony is that texlive-bin worked on > 10.6 before the patch, but doesn't seem to work on any < 10.9 system after the patch, if judging just from http://packages.macports.org/texlive-bin/.

comment:25 Changed 7 years ago by kencu (Ken)

It just revbumped again and built for me on my day-to-day system

  texlive-bin @2017_1+x11 (active) platform='darwin 10' archs='x86_64' date='2017-08-26T10:14:27-0700'

but I'll try it out on my other systems.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:26 Changed 7 years ago by kencu (Ken)

mmm. Indeed, on 10.7 with the default setting of libstdc++, build of texlive-bin now fails with this:

In file included from pdftexdir/pdftosrc.cc:52:
/opt/local/include/poppler/PDFDoc.h:295:153: error: use of undeclared identifier 'nullptr'
  void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);

I don't remember seeing this particular error before. This looks like something might have changed in poppler, and indeed it seems poppler was updated to 0.57.0 two days ago. We're looking at a new error here now.

Now that error can be solved by adding -std=c++11 to the cxx build flags, but in doing so you run into this error later:

./luatexdir/image/pdftoepdf.w:74:34: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
snprintf(ck,PDF_CHECKSUM_SIZE,"%"PRIu64"_%"PRIu64,(uint64_t)size,(uint64_t)mtime);
                                 ^

All moving targets, eh? The cxx11 PortGroup is needed, but other adjustments will now be needed as well given the changes in poppler.

Will need to dig in a bit to see a way through.

comment:27 Changed 7 years ago by kencu (Ken)

These two additions

configure.cxxflags-append -std=c++11
configure.cxxflags-append -Wno-reserved-user-defined-literal

fix the build on 10.7 configured with -stdlib=libstdc++ using the cxx11 1.1 PortGroup.

$ port -v installed texlive-bin poppler
The following ports are currently installed:
  poppler @0.57.0_0 (active) platform='darwin 11' archs='x86_64' date='2017-08-27T15:27:45-0700'
  texlive-bin @2017_1+x11 (active) platform='darwin 11' archs='x86_64' date='2017-08-27T16:40:00-0700'

Of interest, it builds with -stdlib=libc++ using clang-4.0 on Sierra without those additions, and it built on 10.6 with clang-3.9 against libc++, so it seems we could be noticing something different using clang-4.0 to build against gcc6's libstdc++ headers.

Just FYI, it also builds without modification with gcc6 on 10.5 PPC

$ port -v installed texlive-bin poppler
The following ports are currently installed:
  poppler @0.57.0_0 (active) platform='darwin 9' archs='ppc' date='2017-08-27T15:38:51-0700'
  texlive-bin @2017_1+x11 (active) platform='darwin 9' archs='ppc' date='2017-08-27T16:14:58-0700'

Now to sort out exactly which systems need the extra bit added. I suspect we could probably add those two additions to all builds on all systems for simplicity, if gcc6 tolerates -Wno-reserved-user-defined-literal. If not, have to restrict that to clangs.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:28 Changed 7 years ago by kencu (Ken)

I think this PR should do it <https://github.com/macports/macports-ports/pull/717>.

gcc6 did accept the flag, but generated a warning each time about ignoring it -- best to just restrict this to clangs, therefore.

Note: See TracTickets for help on using tickets.