Nolbir01 / rimeime

Automatically exported from code.google.com/p/rimeime
1 stars 0 forks source link

librime failed to build on armel #632

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is the buildlog[1].

An incomplete implementation of std::future in
libstdc++ is the reason[2][3]. std::future
currently depends on ATOMIC_INT_LOCK_FREE > 1,
but it is 1 on armel[5]. As the c++11 support in
gcc is still marked as experimental[4],
it's recommended to have some work-around for
this problem until it's fixed.

Is it OK to revert some of the changes as in
commit 5c27435?

Thanks!

librime 在 armel 上面编译失败[1]。

原因是在 std::future 的定义不完整[2][3]。
在 libstdc++ 里面,std::future 的实现需要
ATOMIC_INT_LOCK_FREE > 1,而在 armel 上面,它
等于1 [5]。因为目前 gcc 以及 libstdc++ 对于 c++11
的支持还没有正式完成(属于实验性的功能),所以还是需��
�
一个不使用 std::future 的过渡方案。

不知道可否使用 commit 5c27435 的一部分,以避免
这个问题?

谢谢!

[1] 
https://buildd.debian.org/status/fetch.php?pkg=librime&arch=armel&ver=1.1%2Bdfsg
-2&stamp=1404754412
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754199
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753079#84
[5] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621#32

Original issue reported on code.google.com by culu....@gmail.com on 12 Jul 2014 at 5:23

GoogleCodeExporter commented 9 years ago
Please use branch 'oldschool' if your compiler does not fully support C++11.

Original comment by chen....@gmail.com on 13 Jul 2014 at 6:52

GoogleCodeExporter commented 9 years ago
Thanks, I just tried to build with oldschool(1d86500) on armel,
but it failed.

mkdir -p build
(cd build; cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..)
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   chrono
--   filesystem
--   regex
--   signals
--   system
--   thread
-- Found gflags: /usr/lib/arm-linux-gnueabi/libgflags.so
-- Found glog: /usr/lib/arm-linux-gnueabi/libglog.so
-- Found yaml-cpp: /usr/lib/arm-linux-gnueabi/libyaml-cpp.so
-- Found kyotocabinet: /usr/lib/arm-linux-gnueabi/libkyotocabinet.so
-- Found marisa: /usr/lib/arm-linux-gnueabi/libmarisa.so
-- Found opencc: /usr/lib/arm-linux-gnueabi/libopencc.so
-- Found X11/keysym.h at /pkg/librime-upstream/thirdparty/include
-- Configuring done
-- Generating done
-- Build files have been written to: /pkg/librime-upstream/build
make -C build
make[1]: Entering directory '/pkg/librime-upstream/build'
make[2]: Entering directory '/pkg/librime-upstream/build'
make[3]: Entering directory '/pkg/librime-upstream/build'
Scanning dependencies of target rime
make[3]: Leaving directory '/pkg/librime-upstream/build'
make[3]: Entering directory '/pkg/librime-upstream/build'
[  1%] Building CXX object src/CMakeFiles/rime.dir/switcher.cc.o
[  2%] Building CXX object src/CMakeFiles/rime.dir/schema.cc.o
[  3%] Building CXX object src/CMakeFiles/rime.dir/menu.cc.o
[  4%] Building CXX object src/CMakeFiles/rime.dir/deployer.cc.o
[  5%] Building CXX object src/CMakeFiles/rime.dir/setup.cc.o
[  6%] Building CXX object src/CMakeFiles/rime.dir/engine.cc.o
[  7%] Building CXX object src/CMakeFiles/rime.dir/key_table.cc.o
[  8%] Building CXX object src/CMakeFiles/rime.dir/core_module.cc.o
[ 10%] Building CXX object src/CMakeFiles/rime.dir/ticket.cc.o
[ 11%] Building CXX object src/CMakeFiles/rime.dir/composition.cc.o
[ 12%] Building CXX object src/CMakeFiles/rime.dir/candidate.cc.o
[ 13%] Building CXX object src/CMakeFiles/rime.dir/segmentation.cc.o
[ 14%] Building CXX object src/CMakeFiles/rime.dir/commit_history.cc.o
[ 15%] Building CXX object src/CMakeFiles/rime.dir/key_event.cc.o
[ 16%] Building CXX object src/CMakeFiles/rime.dir/translation.cc.o
[ 17%] Building CXX object src/CMakeFiles/rime.dir/registry.cc.o
[ 18%] Building CXX object src/CMakeFiles/rime.dir/config.cc.o
[ 20%] Building CXX object src/CMakeFiles/rime.dir/signature.cc.o
[ 21%] Building CXX object src/CMakeFiles/rime.dir/module.cc.o
[ 22%] Building CXX object src/CMakeFiles/rime.dir/service.cc.o
[ 23%] Building CXX object src/CMakeFiles/rime.dir/context.cc.o
[ 24%] Building CXX object src/CMakeFiles/rime.dir/rime_api.cc.o
[ 25%] Building CXX object src/CMakeFiles/rime.dir/algo/utilities.cc.o
[ 26%] Building CXX object src/CMakeFiles/rime.dir/algo/encoder.cc.o
[ 27%] Building CXX object src/CMakeFiles/rime.dir/algo/algebra.cc.o
[ 28%] Building CXX object src/CMakeFiles/rime.dir/algo/syllabifier.cc.o
In file included from /pkg/librime-upstream/include/rime/dict/prism.h:18:0,
                 from /pkg/librime-upstream/src/algo/syllabifier.cc:13:
/pkg/librime-upstream/include/rime/dict/mapped_file.h: In member function 'T* 
rime::MappedFile::Allocate(size_t)':
/pkg/librime-upstream/include/rime/dict/mapped_file.h:137:50: error: expected 
primary-expression before ')' token
 # define RIME_ALIGNED(size, T) ((size + alignof(T) - 1) & ~(alignof(T) - 1))
                                                  ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:147:23: note: in 
expansion of macro 'RIME_ALIGNED'
   size_t used_space = RIME_ALIGNED(size_, T);
                       ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:137:50: error: there are 
no arguments to 'alignof' that depend on a template parameter, so a declaration 
of 'alignof' must be available [-fpermissive]
 # define RIME_ALIGNED(size, T) ((size + alignof(T) - 1) & ~(alignof(T) - 1))
                                                  ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:147:23: note: in 
expansion of macro 'RIME_ALIGNED'
   size_t used_space = RIME_ALIGNED(size_, T);
                       ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:137:50: note: (if you use 
'-fpermissive', G++ will accept your code, but allowing the use of an 
undeclared name is deprecated)
 # define RIME_ALIGNED(size, T) ((size + alignof(T) - 1) & ~(alignof(T) - 1))
                                                  ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:147:23: note: in 
expansion of macro 'RIME_ALIGNED'
   size_t used_space = RIME_ALIGNED(size_, T);
                       ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:137:70: error: expected 
primary-expression before ')' token
 # define RIME_ALIGNED(size, T) ((size + alignof(T) - 1) & ~(alignof(T) - 1))
                                                                      ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:147:23: note: in 
expansion of macro 'RIME_ALIGNED'
   size_t used_space = RIME_ALIGNED(size_, T);
                       ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:137:70: error: there are 
no arguments to 'alignof' that depend on a template parameter, so a declaration 
of 'alignof' must be available [-fpermissive]
 # define RIME_ALIGNED(size, T) ((size + alignof(T) - 1) & ~(alignof(T) - 1))
                                                                      ^
/pkg/librime-upstream/include/rime/dict/mapped_file.h:147:23: note: in 
expansion of macro 'RIME_ALIGNED'
   size_t used_space = RIME_ALIGNED(size_, T);
                       ^
src/CMakeFiles/rime.dir/build.make:629: recipe for target 
'src/CMakeFiles/rime.dir/algo/syllabifier.cc.o' failed
make[3]: *** [src/CMakeFiles/rime.dir/algo/syllabifier.cc.o] Error 1
make[3]: Leaving directory '/pkg/librime-upstream/build'
CMakeFiles/Makefile2:106: recipe for target 'src/CMakeFiles/rime.dir/all' failed
make[2]: *** [src/CMakeFiles/rime.dir/all] Error 2
make[2]: Leaving directory '/pkg/librime-upstream/build'
Makefile:113: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/pkg/librime-upstream/build'
Makefile:29: recipe for target 'librime' failed
make: *** [librime] Error 2

Original comment by culu....@gmail.com on 13 Jul 2014 at 11:58

GoogleCodeExporter commented 9 years ago
alignof is only available with c++11.

Original comment by culu....@gmail.com on 14 Jul 2014 at 2:12

GoogleCodeExporter commented 9 years ago
By the way, there're some nullptr left in oldschool branch.
(Could change them to NULL?)

mkdir -p build
(cd build; cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..)
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   chrono
--   filesystem
--   regex
--   signals
--   system
--   thread
-- Found gflags: /usr/lib/x86_64-linux-gnu/libgflags.so
-- Found glog: /usr/lib/x86_64-linux-gnu/libglog.so
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found yaml-cpp: /usr/lib/x86_64-linux-gnu/libyaml-cpp.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found kyotocabinet: /usr/lib/x86_64-linux-gnu/libkyotocabinet.so
-- Found marisa: /usr/lib/x86_64-linux-gnu/libmarisa.so
-- Found opencc: /usr/lib/x86_64-linux-gnu/libopencc.so
-- Found X11/keysym.h at /home/pkg/ime/upstream/librime/thirdparty/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pkg/ime/upstream/librime/build
make -C build
make[1]: Entering directory '/home/pkg/ime/upstream/librime/build'
make[2]: Entering directory '/home/pkg/ime/upstream/librime/build'
make[3]: Entering directory '/home/pkg/ime/upstream/librime/build'
Scanning dependencies of target rime
make[3]: Leaving directory '/home/pkg/ime/upstream/librime/build'
make[3]: Entering directory '/home/pkg/ime/upstream/librime/build'
[  1%] Building CXX object src/CMakeFiles/rime.dir/registry.cc.o
[  2%] Building CXX object src/CMakeFiles/rime.dir/module.cc.o
[  3%] Building CXX object src/CMakeFiles/rime.dir/rime_api.cc.o
[  4%] Building CXX object src/CMakeFiles/rime.dir/config.cc.o
[  5%] Building CXX object src/CMakeFiles/rime.dir/segmentation.cc.o
[  6%] Building CXX object src/CMakeFiles/rime.dir/switcher.cc.o
[  7%] Building CXX object src/CMakeFiles/rime.dir/translation.cc.o
[  8%] Building CXX object src/CMakeFiles/rime.dir/ticket.cc.o
[ 10%] Building CXX object src/CMakeFiles/rime.dir/setup.cc.o
[ 11%] Building CXX object src/CMakeFiles/rime.dir/candidate.cc.o
[ 12%] Building CXX object src/CMakeFiles/rime.dir/deployer.cc.o
[ 13%] Building CXX object src/CMakeFiles/rime.dir/commit_history.cc.o
[ 14%] Building CXX object src/CMakeFiles/rime.dir/service.cc.o
[ 15%] Building CXX object src/CMakeFiles/rime.dir/context.cc.o
[ 16%] Building CXX object src/CMakeFiles/rime.dir/core_module.cc.o
[ 17%] Building CXX object src/CMakeFiles/rime.dir/engine.cc.o
[ 18%] Building CXX object src/CMakeFiles/rime.dir/signature.cc.o
[ 20%] Building CXX object src/CMakeFiles/rime.dir/key_table.cc.o
[ 21%] Building CXX object src/CMakeFiles/rime.dir/schema.cc.o
[ 22%] Building CXX object src/CMakeFiles/rime.dir/composition.cc.o
[ 23%] Building CXX object src/CMakeFiles/rime.dir/menu.cc.o
[ 24%] Building CXX object src/CMakeFiles/rime.dir/key_event.cc.o
[ 25%] Building CXX object src/CMakeFiles/rime.dir/algo/algebra.cc.o
[ 26%] Building CXX object src/CMakeFiles/rime.dir/algo/syllabifier.cc.o
[ 27%] Building CXX object src/CMakeFiles/rime.dir/algo/utilities.cc.o
[ 28%] Building CXX object src/CMakeFiles/rime.dir/algo/encoder.cc.o
[ 30%] Building CXX object src/CMakeFiles/rime.dir/algo/calculus.cc.o
[ 31%] Building CXX object src/CMakeFiles/rime.dir/dict/table_db.cc.o
[ 32%] Building CXX object src/CMakeFiles/rime.dir/dict/user_db.cc.o
[ 33%] Building CXX object src/CMakeFiles/rime.dir/dict/db.cc.o
[ 34%] Building CXX object src/CMakeFiles/rime.dir/dict/dict_settings.cc.o
[ 35%] Building CXX object src/CMakeFiles/rime.dir/dict/dict_module.cc.o
In file included from 
/home/pkg/ime/upstream/librime/include/rime/dict/table.h:20:0,
                 from /home/pkg/ime/upstream/librime/include/rime/dict/dictionary.h:17,
                 from /home/pkg/ime/upstream/librime/src/dict/dict_module.cc:16:
/home/pkg/ime/upstream/librime/include/rime/dict/string_table.h:47:34: error: 
‘nullptr’ was not declared in this scope
            StringId* reference = nullptr);
                                  ^
src/CMakeFiles/rime.dir/build.make:767: recipe for target 
'src/CMakeFiles/rime.dir/dict/dict_module.cc.o' failed
make[3]: *** [src/CMakeFiles/rime.dir/dict/dict_module.cc.o] Error 1
make[3]: Leaving directory '/home/pkg/ime/upstream/librime/build'
CMakeFiles/Makefile2:106: recipe for target 'src/CMakeFiles/rime.dir/all' failed
make[2]: *** [src/CMakeFiles/rime.dir/all] Error 2
make[2]: Leaving directory '/home/pkg/ime/upstream/librime/build'
Makefile:113: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pkg/ime/upstream/librime/build'
Makefile:29: recipe for target 'librime' failed
make: *** [librime] Error 2

Original comment by culu....@gmail.com on 14 Jul 2014 at 2:33

GoogleCodeExporter commented 9 years ago
fixed.
https://github.com/lotem/librime/commits/oldschool

Original comment by chen....@gmail.com on 14 Jul 2014 at 3:52

GoogleCodeExporter commented 9 years ago
Thank you!

I just wonder: Is oldschool binary compatible with master/develop? And is it ok 
to use oldschool for Debian release[1]?

[1] https://packages.qa.debian.org/libr/librime.html

Original comment by culu....@gmail.com on 14 Jul 2014 at 4:31

GoogleCodeExporter commented 9 years ago

It's binary compatible as long as you exclusively use the C API. The C++ 
classes are not meant to be used outside the library.
Please also not that the binary dictionary files (*.bin) built on ARM is 
different from those built on x86/amd64 platforms.

Please wait for me to bump the version of librime to 1.2.

Original comment by chen....@gmail.com on 14 Jul 2014 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by chen....@gmail.com on 14 Jul 2014 at 7:43

GoogleCodeExporter commented 9 years ago
Thank you!

Original comment by culu....@gmail.com on 15 Jul 2014 at 3:36