Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 4.8 support is broken #1724

Closed
dmoody256 opened this issue May 24, 2019 · 18 comments
Closed

GCC 4.8 support is broken #1724

dmoody256 opened this issue May 24, 2019 · 18 comments
Assignees

Comments

@dmoody256
Copy link

Building with GCC 4.8 on Ubuntu 14 is broken after this commit:
2376867

The build will error out:
./autogen.sh && make

producing errors similar to this:

make[4]: Entering directory `/home/daniel/harfbuzz/repo/src'
  CXX      libharfbuzz_la-hb-aat-layout.lo
In file included from hb.hh:651:0,
                 from hb-open-type.hh:32,
                 from hb-aat-layout.cc:28:
hb-algs.hh: In instantiation of 'decltype (hb_partial<2>(this, hb_forward<_T>(_v)))<anonymous struct>::operator()(_T&&) const [with _T = const OT::RuleSet* const; decltype (hb_partial<2>(this, hb_forward<_T>(_v))) = hb_partial_t<2u, const<anonymous struct>* const&, const OT::RuleSet* const>]':
hb-ot-layout-gsubgpos.hh:1374:27:   required from here
hb-meta.hh:68:56: error: could not convert 'hb_partial<2u, const<anonymous struct>* const, const OT::RuleSet* const>((* & this), (* & hb_forward<const OT::RuleSet* const>((* & _v))))' from 'hb_partial_t<2u, const<anonymous struct>* const, const OT::RuleSet* const>' to 'hb_partial_t<2u, const<anonymous struct>* const&, const OT::RuleSet* const>'
 #define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
                                                        ^
hb-algs.hh:164:36: note: in expansion of macro 'HB_AUTO_RETURN'
   auto operator () (_T&& _v) const HB_AUTO_RETURN (hb_partial<Pos> (this, hb_forward<_T> (_v))) \
                                    ^
hb-algs.hh:831:3: note: in expansion of macro 'HB_PARTIALIZE'
 { HB_PARTIALIZE(2);
   ^

previous commit is working:
6f51e55

@behdad
Copy link
Member

behdad commented May 24, 2019

Umm. Was hoping we can drop gcc 4.9... I'll see if I can debug and bring it back.

@ebraminio maybe we should put back the old gcc in Travis...

@behdad
Copy link
Member

behdad commented May 24, 2019

That error is so nonsensical. I'm not sure if I can fix it.

@behdad
Copy link
Member

behdad commented May 24, 2019

Okay found a gcc 4.9. Debugging.

@dmoody256
Copy link
Author

dmoody256 commented May 24, 2019

FYI, I don't have a particular need for GCC 4.8. So if it is planned to be not supported, that is fine with me. Maybe other users will care?

Just please mention GCC support in the docs or notes somewhere.

@behdad
Copy link
Member

behdad commented May 24, 2019

gcc (Debian 4.9.2-10+deb8u2) 4.9.2 seems to work for me. 4.8 umm. I don't have. How critical you find this?

@dmoody256 dmoody256 changed the title GCC 4 support is broken GCC 4.8 support is broken May 24, 2019
@behdad
Copy link
Member

behdad commented May 24, 2019

Thanks. I'll mention in the release notes for next release.

@behdad behdad closed this as completed May 24, 2019
@dmoody256
Copy link
Author

Also if you ever want to reproduce it, travis has GCC 4.8 in trusty:
https://travis-ci.org/dmoody256/harfbuzz-1/jobs/536848385

@behdad
Copy link
Member

behdad commented May 24, 2019

Thanks. We had that bot and removed it indeed. Without a local reproduction setup I cannot fix. It's too much trial-and-error to do remotely.

@ebraminio
Copy link
Collaborator

@ebraminio maybe we should put back the old gcc in Travis...

we can bring back trusty builder maybe in CircleCI so you can log into it whenever needed but maybe we can update our compiler requirement, nodejs needs GCC 6.3 for example https://github.com/nodejs/node/blob/master/BUILDING.md#supported-toolchains

@behdad
Copy link
Member

behdad commented Jun 1, 2019

This seems to point to the bug affecting gcc 4.8:
https://stackoverflow.com/a/20021858

Note that we are hitting a similar problem with multiple (more recent) versions of Visual Studio:
#1730

@ebraminio
Copy link
Collaborator

So have you fixed it with VS fixes?

@behdad
Copy link
Member

behdad commented Jun 1, 2019

So have you fixed it with VS fixes?

No, the VS workaround requires C++14 and is guarded for MSVC only.

@khaledhosny
Copy link
Collaborator

TeX Live seems to require building with GCC 4.8, so this issue is affecting their builds.

@kberry
Copy link

kberry commented Jun 1, 2019

Following up with more details from Khaled's post ... gcc 4.8.5 (with lots of enhancements -- don't know what the compiler really supports and what it doesn't, due to Red Hat's crazy version number policy) is what is provided by centos 7, whose end-of-life is not until 2024. So ... is it really necessary to use C++ features that it does not support? All previous versions of harfbuzz compiled ok on centos7.

I can certainly arrange for access to such a system for you if that is needed.

In TeX Live, harfbuzz is a critical dependency of the xetex and (new) harftex engines, among other packages. In TL, we try to ship binaries that will work on as many systems as possible. Which means compiling on older systems, with older compilers. Updating either systems or compilers is not desirable.

Thanks.

@hmenke
Copy link

hmenke commented Jun 2, 2019

I quickly bisected this: 2376867
But this is only the first of many others. The real problem is that this is obviously a bug in GCC.

@behdad
Copy link
Member

behdad commented Jun 4, 2019

So ... is it really necessary to use C++ features that it does not support?

That's not a productive point to discuss. If we let every single compiler's limitations to hold us back, we can never modernize our codebase...

I can certainly arrange for access to such a system for you if that is needed.

Yes please do that. I can look into a workaround.

@behdad behdad reopened this Jun 4, 2019
@behdad behdad self-assigned this Jun 7, 2019
@behdad behdad closed this as completed in e4e518f Jun 7, 2019
@behdad
Copy link
Member

behdad commented Jun 7, 2019

Thanks @kberry. Should be fixed. Please test.

blueshade7 pushed a commit that referenced this issue Jun 7, 2019
@kberry
Copy link

kberry commented Jun 12, 2019

indeed, it worked for me with centos7 gcc/g++. thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants