Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626076 - dev-libs/libpqxx fails to build with sed: character class syntax is [[:space:]], not [:space:]
Summary: dev-libs/libpqxx fails to build with sed: character class syntax is [[:space:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-07-24 19:52 UTC by Robert Marmorstein
Modified: 2017-08-15 20:08 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Emerge Info (emerge.info,6.39 KB, application/x-info)
2017-07-24 19:52 UTC, Robert Marmorstein
Details
Ebuild that fixes the issue (libpqxx-5.0.1-r1.ebuild,2.63 KB, text/plain)
2017-07-24 19:53 UTC, Robert Marmorstein
Details
libpqxx-5.1.0.ebuild.diff (libpqxx-5.1.0.ebuild.diff,1.45 KB, patch)
2017-08-08 19:50 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Marmorstein 2017-07-24 19:52:37 UTC
Created attachment 486726 [details]
Emerge Info

With recent binutils, "sed" has become more strict, which causes libpqxx to fail the "configure" step with this error message:

sed: character class syntax is [[:space:]], not [:space:]

This results in a subsequent linking error:

checking for correct C++ linkage of basic libpq functions... configure: error: 
Linking a call to libpq failed in C++, even though it succeeded in C.  If your
C and C++ compilers are very different beasts, this may mean that we do not have
the right options for linking with it after all.

It looks like this is "fixed" in the libpqxx git repository by replacing the [[:space:]] match with a literal space.  It's fairly easy to duplicate this by changing one line of configure/configure.ac/configure.ac.in.
Comment 1 Robert Marmorstein 2017-07-24 19:53:30 UTC
Created attachment 486728 [details]
Ebuild that fixes the issue

This ebuild contains a sed command that fixes the configure script.
Comment 2 Robert Marmorstein 2017-07-24 19:54:29 UTC
I've attached an ebuild that seems to fix the issue.  It should only be necessary until the next release of libpqxx comes out.
Comment 3 Vadim A. Misbakh-Soloviov (mva) (RETIRED) gentoo-dev 2017-07-25 06:05:57 UTC
I guess, it would be faster (by "it" I mean fixing issue in the gentoo repo) if you'll make pull-request on github, and add link to that bug in it's description (and link to that PR here in comments) :)
Also, it is possible to poke maintainers on IRC to speed-up PR merging process :)
Comment 4 Robert Marmorstein 2017-07-25 08:27:52 UTC
Sounds good.  Can you point me in the right direction to get started?  I didn't realize Gentoo had migrated to github...
Comment 5 Vadim A. Misbakh-Soloviov (mva) (RETIRED) gentoo-dev 2017-07-25 09:12:19 UTC
(In reply to Robert Marmorstein from comment #4)
> Sounds good.  Can you point me in the right direction to get started?  I
> didn't realize Gentoo had migrated to github...

Well, gentoo doesn't migrate there. Just mirrors.

So, when I did PRs (that was accepted later) my algorithm was:
☑ 0) create bug here on BZ
☐ 1) go to https://github.com/gentoo/gentoo
☐ 2) fork it
☐ 3) clone forked
☐ 4) fix ebuilds
☐ 5) make Pull Request (again on github's web interface)
☐ 6) some comments about the reason of fix + link to the BZ#bug in PR description
☐ 7) return to BZ and post link to PR
☐ 8) go to #gentoo-dev @ FreeNode and ping maintainers (well, I've 'gentoo/contributor' cloak there on FreeNode, so I can speak in dev-channel. You, probably, don't, so I can poke maintainers for you (I'm interested in fix too)).
Comment 6 Robert Marmorstein 2017-07-26 08:05:57 UTC
I'm having trouble getting repoman to work (it complains about gpg), but I can submit a pull request directly.  Will that work?
Comment 7 Vadim A. Misbakh-Soloviov (mva) (RETIRED) gentoo-dev 2017-07-26 09:05:00 UTC
Well, it worked for me.
Comment 8 Aaron W. Swenson gentoo-dev 2017-07-26 13:12:23 UTC
Actually, I'd much rather you didn't use GitHub.

I get too many notifications from that resource, and the ones that matter get drowned out in the noise.

This bug track or an email directly to me is the best means to contact me.

That said, binutils isn't the issue. Which version of sed are you running?
Comment 9 Robert Marmorstein 2017-07-27 01:00:04 UTC
I'm using GNU Sed 4.4 (sys-apps/sed-4.4:0).  Sorry -- I didn't realize that was in a separate package from binutils.  Thanks for your help!
Comment 10 Aaron W. Swenson gentoo-dev 2017-07-27 11:00:50 UTC
I think upstream screwed up their release. 5.1.0 has been tagged noting that it's the last release with support for pre-C++11 compilers, but it hasn't been marked as a release.

https://github.com/jtv/libpqxx/releases/tag/5.1.0

One of the fixes upstream had done is changing [:space:] to [[:space:]].

Try just bumping 5.0.1 to 5.1.0. If it works for you, I'll get it done in tree.
Comment 11 Andreas Sturmlechner gentoo-dev 2017-08-08 19:50:57 UTC
Created attachment 488364 [details, diff]
libpqxx-5.1.0.ebuild.diff
Comment 12 Aaron W. Swenson gentoo-dev 2017-08-10 12:41:41 UTC
(In reply to Andreas Sturmlechner from comment #11)
> Created attachment 488364 [details, diff] [details, diff]
> libpqxx-5.1.0.ebuild.diff

*Sigh* I forgot to thank you in the commit note.

commit 0e5ca9aa1739831e140c68d090319e189d38977a (HEAD -> master, origin/master, origin/HEAD)
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Thu Aug 10 08:40:08 2017 -0400

    dev-libs/libpqxx: Bump to 5.1.0

    Fixes bug 626076 where newer version of sed are more strict about
    character class syntax.

    Last release to support pre-C++11 compilers.

    Gentoo-Bug: 626076

    Package-Manager: Portage-2.3.6, Repoman-2.3.1
Comment 13 Andreas Sturmlechner gentoo-dev 2017-08-15 20:08:22 UTC
No biggie. I assume we can remove 5.0.1 with its troubled regex? The we can close https://github.com/gentoo/gentoo/pull/5218 as obsolete.