Opened 5 months ago

Closed 5 months ago

#73087 closed defect (duplicate)

clucene @2.3.3.4: error: constant expression evaluates to 2147483648 which cannot be narrowed to type 'int32_t' (aka 'int') [-Wc++11-narrowing]

Reported by: gsdali Owned by: dinh.viet.hoa@…
Priority: Normal Milestone:
Component: ports Version: 2.11.5
Keywords: tahoe Cc:
Port: clucene

Description

Whilst attempting to install LibreOffice I ran up against an issue with the dependency, clucene.

--->  Building clucene                                   
Error: Failed to build clucene: command execution failed 
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_clucene/clucene/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port clucene failed

Looking at the log there appears to be an issue with cmake

:info:build make[2]: Leaving directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
:info:build make[1]: *** [src/core/CMakeFiles/clucene-core.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/clucene-c2d21721/work/build" && /usr/bin/make -j10 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build clucene: command execution failed
:debug:build Error code: CHILDSTATUS 2628 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 10)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_clucene/clucene/main.log for details.

Trying to execute cmake directly generates the following output

% sudo cd "/opt/local/var/macports/build/clucene-c2d21721/work/build" && /usr/bin/make -j10 -w all VERBOSE=ON 
make: Entering directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
/opt/local/bin/cmake -S/opt/local/var/macports/build/clucene-c2d21721/work/clucene-core-2.3.3.4 -B/opt/local/var/macports/build/clucene-c2d21721/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/clucene-c2d21721/work/build/CMakeFiles /opt/local/var/macports/build/clucene-c2d21721/work/build//CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f src/shared/CMakeFiles/clucene-shared.dir/build.make src/shared/CMakeFiles/clucene-shared.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
cd /opt/local/var/macports/build/clucene-c2d21721/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/clucene-c2d21721/work/clucene-core-2.3.3.4 /opt/local/var/macports/build/clucene-c2d21721/work/clucene-core-2.3.3.4/src/shared /opt/local/var/macports/build/clucene-c2d21721/work/build /opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared /opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/DependInfo.cmake "--color="
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/SharedHeader.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/gunichartables.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/repl_lltot.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/repl_tcscasecmp.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/repl_tcslwr.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/repl_tcstod.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/repl_tcstoll.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/repl_tprintf.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/threads.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/config/utf8.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/debug/condition.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/util/Misc.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/util/StringBuffer.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Dependencies file "src/shared/CMakeFiles/clucene-shared.dir/CLucene/util/dirent.o.d" is newer than depends file "/opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target clucene-shared
CMake Error: Cannot open file for write: /opt/local/var/macports/build/clucene-c2d21721/work/build/src/shared/CMakeFiles/clucene-shared.dir/compiler_depend.make.tmpcf2e6
CMake Error: : System Error: Permission denied
make[2]: *** [src/shared/CMakeFiles/clucene-shared.dir/depend] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
make[1]: *** [src/shared/CMakeFiles/clucene-shared.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/clucene-c2d21721/work/build'

Full Log attached

Attachments (1)

main.log (344.8 KB) - added by gsdali 5 months ago.
clucene install log

Download all attachments as: .zip

Change History (4)

Changed 5 months ago by gsdali

Attachment: main.log added

clucene install log

comment:1 Changed 5 months ago by gsdali

Keywords: tahoe added
Port: tahoe macOS libreoffice added

comment:2 Changed 5 months ago by jmroot (Joshua Root)

Owner: set to dinh.viet.hoa@…
Port: tahoe macOS libreoffice removed
Status: newassigned

comment:3 in reply to:  description Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed
Summary: Clucene fails to build on Mac OS X Tahoe 26.0.1 (LibreOffice Dependency)clucene @2.3.3.4: error: constant expression evaluates to 2147483648 which cannot be narrowed to type 'int32_t' (aka 'int') [-Wc++11-narrowing]

Replying to gsdali:

Trying to execute cmake directly generates the following output

% sudo cd "/opt/local/var/macports/build/clucene-c2d21721/work/build" && /usr/bin/make -j10 -w all VERBOSE=ON 
CMake Error: : System Error: Permission denied

Permission is denied here because sudo a && b only runs a as the superuser; b runs as the regular user.

There are several errors in the log, all of this form:

…/src/core/CLucene/queryParser/QueryParser.cpp:82:176: error: constant expression evaluates to 2147483648 which cannot be narrowed to type 'int32_t' (aka 'int') [-Wc++11-narrowing]
   82 | const int32_t QueryParser::jj_la1_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,0x80000000,0x20000000,0x80000000,0x10000,0x80000,0x10000,0x1f68000};
      |                                                                                                                                                                                ^~~~~~~~~~
…/src/core/CLucene/queryParser/QueryParser.cpp:82:176: note: insert an explicit cast to silence this issue
   82 | const int32_t QueryParser::jj_la1_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,0x80000000,0x20000000,0x80000000,0x10000,0x80000,0x10000,0x1f68000};
      |                                                                                                                                                                                ^~~~~~~~~~
      |                                                                                                                                                                                static_cast<int32_t>( )

Duplicate of #62192.

Note: See TracTickets for help on using tickets.