Closed Dreamer57 closed 2 weeks ago
@LEOYoon-Tsaw
make
make: the `-j' option requires a positive integral argument
cmake . -Bbuild \
-DCMAKE_INSTALL_PREFIX=/Users/yinrui/Documents/github/rime/squirrel/librime/dist \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_MERGED_PLUGINS=OFF \
-DENABLE_EXTERNAL_PLUGINS=ON
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /opt/homebrew/lib/cmake/Boost-1.86.0/BoostConfig.cmake (found suitable version "1.86.0", minimum required is "1.77.0")
-- Found glog: /Users/yinrui/Documents/github/rime/squirrel/librime/lib/libglog.a
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found GTest: /Users/yinrui/Documents/github/rime/squirrel/librime/lib/cmake/GTest/GTestConfig.cmake (found version "1.14.0")
-- Found yaml-cpp: /Users/yinrui/Documents/github/rime/squirrel/librime/lib/libyaml-cpp.a
-- Found leveldb: /Users/yinrui/Documents/github/rime/squirrel/librime/lib/libleveldb.a
-- Found marisa: /Users/yinrui/Documents/github/rime/squirrel/librime/lib/libmarisa.a
-- Found opencc: /Users/yinrui/Documents/github/rime/squirrel/librime/lib/libopencc.a
-- Found X11/keysym.h at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Tk.framework/Headers
-- rime_plugins_libs:
-- rime_plugins_modules: plugins
-- Configuring done (1.7s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/yinrui/Documents/github/rime/squirrel/librime/build
cmake --build build
[1/139] Building CXX object src/CM...les/rime.dir/rime_api_stdbool.cc.o
FAILED: src/CMakeFiles/rime.dir/rime_api_stdbool.cc.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DBOOST_DLL_USE_STD_FS -DGLOG_DEPRECATED="__attribute__((deprecated))" -DGLOG_EXPORT="__attribute__((visibility(\"default\")))" -DGLOG_NO_EXPORT="__attribute__((visibility(\"default\")))" -DRIME_BUILD_SHARED_LIBS -DRIME_EXPORTS -DRIME_EXTRA_MODULES=",Q(plugins)" -DRIME_VERSION=\"1.11.2\" -I/opt/homebrew/include -I/Users/yinrui/Documents/github/rime/squirrel/librime/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Tk.framework/Headers -I/Users/yinrui/Documents/github/rime/squirrel/librime/build/src -I/Users/yinrui/Documents/github/rime/squirrel/librime/src -std=c++17 -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -mmacosx-version-min=10.15 -fPIC -MD -MT src/CMakeFiles/rime.dir/rime_api_stdbool.cc.o -MF src/CMakeFiles/rime.dir/rime_api_stdbool.cc.o.d -o src/CMakeFiles/rime.dir/rime_api_stdbool.cc.o -c /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:5:
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime/composition.h:10:
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime/segmentation.h:10:
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:35:13: error: redeclaration of C++ built-in type 'bool'
typedef int Bool;
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.h:14:14: note: expanded from macro 'Bool'
#define Bool bool
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:25:22: error: static declaration of 'RimeSetup' follows non-static declaration
RIME_DEPRECATED void RimeSetup(RimeTraits* traits) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:207:15: note: previous declaration is here
RIME_API void RimeSetup(RimeTraits *traits);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:29:29: error: use of undeclared identifier 'app_name'
if (RIME_PROVIDED(traits, app_name)) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:39:22: error: static declaration of 'RimeSetNotificationHandler' follows non-static declaration
RIME_DEPRECATED void RimeSetNotificationHandler(RimeNotificationHandler handler,
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:233:15: note: previous declaration is here
RIME_API void RimeSetNotificationHandler(RimeNotificationHandler handler,
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:51:22: error: static declaration of 'RimeInitialize' follows non-static declaration
RIME_DEPRECATED void RimeInitialize(RimeTraits* traits) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:238:15: note: previous declaration is here
RIME_API void RimeInitialize(RimeTraits *traits);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:53:37: error: use of undeclared identifier 'modules'
LoadModules(RIME_PROVIDED(traits, modules) ? traits->modules
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:58:22: error: static declaration of 'RimeFinalize' follows non-static declaration
RIME_DEPRECATED void RimeFinalize() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:239:15: note: previous declaration is here
RIME_API void RimeFinalize(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:65:22: error: static declaration of 'RimeStartMaintenance' follows non-static declaration
RIME_DEPRECATED Bool RimeStartMaintenance(Bool full_check) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:241:15: note: previous declaration is here
RIME_API Bool RimeStartMaintenance(Bool full_check);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:91:22: error: static declaration of 'RimeStartMaintenanceOnWorkspaceChange' follows non-static declaration
RIME_DEPRECATED Bool RimeStartMaintenanceOnWorkspaceChange() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:244:15: note: previous declaration is here
RIME_API Bool RimeStartMaintenanceOnWorkspaceChange(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:95:22: error: static declaration of 'RimeIsMaintenancing' follows non-static declaration
RIME_DEPRECATED Bool RimeIsMaintenancing() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:245:15: note: previous declaration is here
RIME_API Bool RimeIsMaintenancing(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:100:22: error: static declaration of 'RimeJoinMaintenanceThread' follows non-static declaration
RIME_DEPRECATED void RimeJoinMaintenanceThread() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:246:15: note: previous declaration is here
RIME_API void RimeJoinMaintenanceThread(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:107:22: error: static declaration of 'RimeDeployerInitialize' follows non-static declaration
RIME_DEPRECATED void RimeDeployerInitialize(RimeTraits* traits) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:250:15: note: previous declaration is here
RIME_API void RimeDeployerInitialize(RimeTraits *traits);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:109:37: error: use of undeclared identifier 'modules'
LoadModules(RIME_PROVIDED(traits, modules) ? traits->modules
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:113:22: error: static declaration of 'RimePrebuildAllSchemas' follows non-static declaration
RIME_DEPRECATED Bool RimePrebuildAllSchemas() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:251:15: note: previous declaration is here
RIME_API Bool RimePrebuildAllSchemas(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:118:22: error: static declaration of 'RimeDeployWorkspace' follows non-static declaration
RIME_DEPRECATED Bool RimeDeployWorkspace() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:252:15: note: previous declaration is here
RIME_API Bool RimeDeployWorkspace(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:126:22: error: static declaration of 'RimeDeploySchema' follows non-static declaration
RIME_DEPRECATED Bool RimeDeploySchema(const char* schema_file) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:253:15: note: previous declaration is here
RIME_API Bool RimeDeploySchema(const char *schema_file);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:131:22: error: static declaration of 'RimeDeployConfigFile' follows non-static declaration
RIME_DEPRECATED Bool RimeDeployConfigFile(const char* file_name,
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:254:15: note: previous declaration is here
RIME_API Bool RimeDeployConfigFile(const char *file_name, const char *version_key);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:138:22: error: static declaration of 'RimeSyncUserData' follows non-static declaration
RIME_DEPRECATED Bool RimeSyncUserData() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:256:15: note: previous declaration is here
RIME_API Bool RimeSyncUserData(void);
^
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_stdbool.cc:3:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:149:31: error: static declaration of 'RimeCreateSession' follows non-static declaration
RIME_DEPRECATED RimeSessionId RimeCreateSession() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/include/rime_api.h:260:24: note: previous declaration is here
RIME_API RimeSessionId RimeCreateSession(void);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[5/139] Building CXX object src/CMakeFiles/rime.dir/rime_api.cc.o
FAILED: src/CMakeFiles/rime.dir/rime_api.cc.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DBOOST_DLL_USE_STD_FS -DGLOG_DEPRECATED="__attribute__((deprecated))" -DGLOG_EXPORT="__attribute__((visibility(\"default\")))" -DGLOG_NO_EXPORT="__attribute__((visibility(\"default\")))" -DRIME_BUILD_SHARED_LIBS -DRIME_EXPORTS -DRIME_EXTRA_MODULES=",Q(plugins)" -DRIME_VERSION=\"1.11.2\" -I/opt/homebrew/include -I/Users/yinrui/Documents/github/rime/squirrel/librime/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Tk.framework/Headers -I/Users/yinrui/Documents/github/rime/squirrel/librime/build/src -I/Users/yinrui/Documents/github/rime/squirrel/librime/src -std=c++17 -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -mmacosx-version-min=10.15 -fPIC -MD -MT src/CMakeFiles/rime.dir/rime_api.cc.o -MF src/CMakeFiles/rime.dir/rime_api.cc.o.d -o src/CMakeFiles/rime.dir/rime_api.cc.o -c /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api.cc
In file included from /Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api.cc:13:
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:25:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED void RimeSetup(RimeTraits* traits) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:29:29: error: use of undeclared identifier 'app_name'
if (RIME_PROVIDED(traits, app_name)) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:39:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED void RimeSetNotificationHandler(RimeNotificationHandler handler,
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:51:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED void RimeInitialize(RimeTraits* traits) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:53:37: error: use of undeclared identifier 'modules'
LoadModules(RIME_PROVIDED(traits, modules) ? traits->modules
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:58:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED void RimeFinalize() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:65:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED Bool RimeStartMaintenance(Bool full_check) {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:65:21: error: expected ';' after top level declarator
RIME_DEPRECATED Bool RimeStartMaintenance(Bool full_check) {
^
;
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:675:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED Bool RimeConfigBeginList(RimeConfigIterator* iterator,
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:675:21: error: expected ';' after top level declarator
RIME_DEPRECATED Bool RimeConfigBeginList(RimeConfigIterator* iterator,
^
;
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:1128:10: error: unknown type name 'RIME_FLAVORED'
RIME_API RIME_FLAVORED(RimeApi) * RIME_FLAVORED(rime_get_api)() {
^
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api_impl.h:1128:32: error: expected ';' after top level declarator
RIME_API RIME_FLAVORED(RimeApi) * RIME_FLAVORED(rime_get_api)() {
^
;
/Users/yinrui/Documents/github/rime/squirrel/librime/src/rime_api.cc:17:1: error: unknown type name 'RIME_DEPRECATED'
RIME_DEPRECATED void RimeSetupLogging(const char* app_name) {
^
13 errors generated.
[10/139] Building CXX object src/CMakeFiles/rime.dir/rime/engine.cc.o
ninja: build stopped: subcommand failed.
make: *** [release] Error 1
装了llvm和ninja后,错误变了,大佬快来看看 @LEOYoon-Tsaw
[1/139] Building CXX object src/CM...les/rime.dir/rime_api_stdbool.cc.o
FAILED: src/CMakeFiles/rime.dir/rime_api_stdbool.cc.o
error: redeclaration of C++ built-in type 'bool'
typedef int Bool;
^
沒用最新的squirrel,或者自己改過
沒用最新的squirrel,或者自己改過
大佬你终于来了,我现在还在构建librime,还没有到构建squirrel这一步。
这个错误提示,感觉不是代码的问题,是我环境上缺了什么?
我安装了llvm和ninja,构建librime是否需要这两个?我看ci里有这两个。
@LEOYoon-Tsaw
而且我是在我未修改的branch上构建的
無法復現
無法復現
那我重新clone一份全新的代码试试
如果之前 make install 过,要注意删掉 /usr/[local/]include 里的 rime 头文件。
还真是无法复现,我clone了份新代码正常编译,也不需要llvm和ninja,我再自己对比下代码文件吧。
@ksqsf 我看了/usr/local/include 目标是空的。
删除 lib bin share include 中的多余文件后编译成功。感谢各位。
大佬们帮忙看下咋回事