Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931999 - dev-perl/Search-Xapian-1.2.25.5-r3 - /.../types.h: error: unknown type name namespace
Summary: dev-perl/Search-Xapian-1.2.25.5-r3 - /.../types.h: error: unknown type name n...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 661728 755206 829752 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-16 19:21 UTC by Toralf Förster
Modified: 2024-07-14 22:40 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,23.82 KB, text/plain)
2024-05-16 19:21 UTC, Toralf Förster
Details
dev-perl:Search-Xapian-1.2.25.5-r1:20240516-191938.log (dev-perl:Search-Xapian-1.2.25.5-r1:20240516-191938.log,8.17 KB, text/plain)
2024-05-16 19:21 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,133.79 KB, application/x-xz)
2024-05-16 19:21 UTC, Toralf Förster
Details
environment (environment,88.13 KB, text/plain)
2024-05-16 19:21 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.34 KB, application/x-xz)
2024-05-16 19:21 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,56.20 KB, application/x-xz)
2024-05-16 19:21 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,131.58 KB, application/x-xz)
2024-05-16 19:21 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,21.05 KB, application/x-xz)
2024-05-16 19:21 UTC, Toralf Förster
Details
fixed ebuild (Search-Xapian-1.2.25.5-r3.ebuild,790 bytes, application/vnd.gentoo.ebuild)
2024-05-22 10:49 UTC, smail.muk2
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-05-16 19:21:32 UTC
cp Xapian/QueryParser.pm blib/lib/Search/Xapian/QueryParser.pm
cp Xapian/UnimplementedError.pm blib/lib/Search/Xapian/UnimplementedError.pm
mv Xapian.xsc Xapian.c
x86_64-pc-linux-gnu-gcc -c   -O2 -pipe -march=native -fno-diagnostics-color -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -O2 -pipe -march=native -fno-diagnostics-color   -DVERSION=\"1.2.25.5\" -DXS_VERSION=\"1.2.25.5\" -fPIC "-I/usr/lib64/perl5/5.38/x86_64-linux/CORE"   Xapian.c
In file included from /usr/include/xapian.h:47,
                 from Xapian.xs:3:
/usr/include/xapian/types.h:31:1: error: unknown type name namespace
   31 | namespace Xapian {
      | ^~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_hardened-20240506-180046

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 18.1.5
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.5
Python 3.11.9
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby32 (with Rubygems)
  [3]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.77.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.23_p9 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.11_p9 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.3_p9 [openjdk-bin-21]
4)	Eclipse Temurin JDK 8.412_p08 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17 
  [4]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
go version go1.22.3 linux/amd64

  HEAD of ::gentoo
commit aee8435339a74e0cc93110f0ac9940c64419d060
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu May 16 17:48:57 2024 +0000

    2024-05-16 17:48:56 UTC

emerge -qpvO dev-perl/Search-Xapian
[ebuild  N    ] dev-perl/Search-Xapian-1.2.25.5-r1  USE="-examples -test" PERL_FEATURES="(-debug) -ithreads -quadmath"
Comment 1 Toralf Förster gentoo-dev 2024-05-16 19:21:33 UTC
Created attachment 893075 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-05-16 19:21:34 UTC
Created attachment 893076 [details]
dev-perl:Search-Xapian-1.2.25.5-r1:20240516-191938.log
Comment 3 Toralf Förster gentoo-dev 2024-05-16 19:21:35 UTC
Created attachment 893077 [details]
emerge-history.txt.xz
Comment 4 Toralf Förster gentoo-dev 2024-05-16 19:21:36 UTC
Created attachment 893078 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-05-16 19:21:37 UTC
Created attachment 893079 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-05-16 19:21:38 UTC
Created attachment 893080 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-05-16 19:21:39 UTC
Created attachment 893081 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2024-05-16 19:21:40 UTC
Created attachment 893082 [details]
temp.tar.xz
Comment 9 Agostino Sarubbo gentoo-dev 2024-05-19 07:14:18 UTC
gcc14_tinderbox has reproduced this issue with version 1.2.25.5-r3 - Updating summary.
Comment 10 smail.muk2 2024-05-22 10:49:09 UTC
Created attachment 893799 [details]
fixed ebuild

The reason is to use * .c extension in the package (when generating), not * .cpp and use gcc instead of g++. I don't know much about ExtUtils:: MakeMaker and Makefile.PL.
Used hack - replaced gcc with g++ via env.

Solution #1:
Use attached ebuild in self overlay. 
P.S. If they do not fix it in future versions, then it is better to use solution #2.

Solution #2:
mkdir /etc/portage/env/
chown portage:portage /etc/portage/env/
printf '## use g++ as CC\nCC="${CHOST}-g++"' > /etc/portage/env/use-g++-as-cc.conf
printf 'dev-perl/Search-Xapian use-g++-as-cc.conf\n' >> /etc/portage/package.env

Result #1 && #2: 
Compilation successful.
Comment 11 Jason A. Donenfeld gentoo-dev 2024-06-18 14:47:45 UTC
I did this:

    $ sudo CC=g++ emerge -v1O Search-Xapian

But that's pretty bad.
Comment 12 Larry the Git Cow gentoo-dev 2024-06-18 14:50:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa0196a52ef387ccbc5bf0badd50ad1e86f06a78

commit aa0196a52ef387ccbc5bf0badd50ad1e86f06a78
Author:     Jason A. Donenfeld <zx2c4@gentoo.org>
AuthorDate: 2024-06-18 14:48:52 +0000
Commit:     Jason A. Donenfeld <zx2c4@gentoo.org>
CommitDate: 2024-06-18 14:50:16 +0000

    dev-perl/Search-Xapian: use g++ as CC
    
    This is an ugly hack to work around a bug.
    
    Closes: https://bugs.gentoo.org/931999
    Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>

 .../Search-Xapian/Search-Xapian-1.2.25.5-r4.ebuild | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-14 22:40:12 UTC
*** Bug 755206 has been marked as a duplicate of this bug. ***
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-14 22:40:25 UTC
*** Bug 829752 has been marked as a duplicate of this bug. ***
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-14 22:40:30 UTC
*** Bug 661728 has been marked as a duplicate of this bug. ***