xiehuc / pidgin-lwqq

a pidgin plugin based on lwqq, a excellent safe useful library for webqq protocol
GNU General Public License v3.0
660 stars 185 forks source link

Fedora22 编译失败 #652

Closed theburn closed 9 years ago

theburn commented 9 years ago

不知道是否是GCC5.1.1的问题

cmake .. 报如下错误

root  build# cmake ..
-- The C compiler identification is GNU 5.1.1
-- The CXX compiler identification is GNU 5.1.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "/usr/lib64/ccache/c++" is not able to compile a simple
  test program.

  It fails with the following output:

   Change Dir: /opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeTmp

  Run Build Command:"/bin/gmake" "cmTryCompileExec2910737449/fast"

  /bin/gmake -f CMakeFiles/cmTryCompileExec2910737449.dir/build.make
  CMakeFiles/cmTryCompileExec2910737449.dir/build

  gmake[1]: Entering directory
  '/opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  /opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building CXX object
  CMakeFiles/cmTryCompileExec2910737449.dir/testCXXCompiler.cxx.o

  /usr/lib64/ccache/c++ -o
  CMakeFiles/cmTryCompileExec2910737449.dir/testCXXCompiler.cxx.o -c
  /opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx

  Linking CXX executable cmTryCompileExec2910737449

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec2910737449.dir/link.txt --verbose=1

  /usr/lib64/ccache/c++
  CMakeFiles/cmTryCompileExec2910737449.dir/testCXXCompiler.cxx.o -o
  cmTryCompileExec2910737449 -rdynamic

  c++: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found

  compilation terminated.

  CMakeFiles/cmTryCompileExec2910737449.dir/build.make:88: recipe for target
  'cmTryCompileExec2910737449' failed

  gmake[1]: Leaving directory
  '/opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeTmp'

  gmake[1]: *** [cmTryCompileExec2910737449] Error 1

  Makefile:117: recipe for target 'cmTryCompileExec2910737449/fast' failed

  gmake: *** [cmTryCompileExec2910737449/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)

-- Configuring incomplete, errors occurred!
See also "/opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeOutput.log".
See also "/opt/lwqq/orignal/pidgin-lwqq/build/CMakeFiles/CMakeError.log".
root build# /usr/lib64/ccache/c++  --version
c++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
CapnKernel commented 9 years ago

Hi. (对不起,我的国语这么差)

I'm running F20. I can compile pidgin-lwqq from about two weeks ago ok. I have gcc c++ 4.8.3.

Can your compiler compile a small "hello world" program?

http://www2.latech.edu/~acm/helloworld/c++.html

If this helps you, here are my spec files, which I use to generate RPMs. (I'm still running an old version of Pidgin, but these spec files are for 0.6.0)

https://gist.github.com/CapnKernel/409233f4c3516d3b64f1

My build looks like this:

[mjd@xiaomao rpmbuild]$ rpmbuild -bb mySPECS/pidgin-lwqq.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9Sy08G
+ umask 022
+ cd /home/mjd/rpmbuild/BUILD
+ cd /home/mjd/rpmbuild/BUILD
+ rm -rf pidgin-lwqq
+ /usr/bin/bzip2 -dc /home/mjd/rpmbuild/SOURCES/pidgin-lwqq.tar.bz2
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd pidgin-lwqq
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.8Ii0Pd
+ umask 022
+ cd /home/mjd/rpmbuild/BUILD
+ cd pidgin-lwqq
+ mkdir build
+ cd build
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE=Debug ..
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /bin/pkg-config (found version "0.28") 
-- checking for module 'purple'
--   found purple, version 2.10.10
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.38.2
-- checking for module 'lwqq>=0.6.0'
--   found lwqq, version 0.6.0
libpurple version:2.10.10
-- Found Gettext: /bin/msgmerge (found version "0.18.3") 
===============pidgin-lwqq flags===============
-- Native Language Support : true
-- Install Path            : /usr/lib64/purple-2
===============================================
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_FLAGS_RELEASE
    CMAKE_Fortran_FLAGS_RELEASE
    INCLUDE_INSTALL_DIR
    LIB_SUFFIX
    SHARE_INSTALL_PREFIX
    SYSCONF_INSTALL_DIR

-- Build files have been written to: /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build
+ make -C build -j3
make: Entering directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
/usr/bin/cmake -H/home/mjd/rpmbuild/BUILD/pidgin-lwqq -B/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
make -f src/CMakeFiles/webqq.dir/build.make src/CMakeFiles/webqq.dir/depend
make -f po/CMakeFiles/pidgin-lwqq-translations.dir/build.make po/CMakeFiles/pidgin-lwqq-translations.dir/depend
make[2]: Entering directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mjd/rpmbuild/BUILD/pidgin-lwqq /home/mjd/rpmbuild/BUILD/pidgin-lwqq/po /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/po /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/po/CMakeFiles/pidgin-lwqq-translations.dir/DependInfo.cmake --color=
make[2]: Entering directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mjd/rpmbuild/BUILD/pidgin-lwqq /home/mjd/rpmbuild/BUILD/pidgin-lwqq/src /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src/CMakeFiles/webqq.dir/DependInfo.cmake --color=
Scanning dependencies of target pidgin-lwqq-translations
Scanning dependencies of target webqq
make[2]: Leaving directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
make -f po/CMakeFiles/pidgin-lwqq-translations.dir/build.make po/CMakeFiles/pidgin-lwqq-translations.dir/build
make[2]: Entering directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
/usr/bin/cmake -E cmake_progress_report /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles 1
/usr/bin/cmake -E cmake_progress_report /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles 2
[ 10%] [ 20%] Generating en.mo
Generating zh_CN.mo
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/po && /bin/msgfmt -o /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/po/en.mo /home/mjd/rpmbuild/BUILD/pidgin-lwqq/po/en.po
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/po && /bin/msgfmt -o /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/po/zh_CN.mo /home/mjd/rpmbuild/BUILD/pidgin-lwqq/po/zh_CN.po
make[2]: Leaving directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
/usr/bin/cmake -E cmake_progress_report /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles  1 2
[ 20%] Built target pidgin-lwqq-translations
make[2]: Leaving directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
make -f src/CMakeFiles/webqq.dir/build.make src/CMakeFiles/webqq.dir/build
make[2]: Entering directory `/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build'
/usr/bin/cmake -E cmake_progress_report /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles 3
/usr/bin/cmake -E cmake_progress_report /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles 4
[ 30%] /usr/bin/cmake -E cmake_progress_report /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/CMakeFiles 5
[ 40%] [ 50%] Building C object src/CMakeFiles/webqq.dir/trex.c.o
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src && /bin/cc  -DINST_PREFIX=\"/usr\" -Dwebqq_EXPORTS -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic  -g -fPIC -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src -I/usr/include/lwqq    -Wall -Wall -o CMakeFiles/webqq.dir/trex.c.o   -c /home/mjd/rpmbuild/BUILD/pidgin-lwqq/src/trex.c
Building C object src/CMakeFiles/webqq.dir/webqq.c.o
Building C object src/CMakeFiles/webqq.dir/translate.c.o
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src && /bin/cc  -DINST_PREFIX=\"/usr\" -Dwebqq_EXPORTS -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic  -g -fPIC -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src -I/usr/include/lwqq    -Wall -Wall -o CMakeFiles/webqq.dir/webqq.c.o   -c /home/mjd/rpmbuild/BUILD/pidgin-lwqq/src/webqq.c
cd /home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src && /bin/cc  -DINST_PREFIX=\"/usr\" -Dwebqq_EXPORTS -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic  -g -fPIC -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/mjd/rpmbuild/BUILD/pidgin-lwqq/build/src -I/usr/include/lwqq    -Wall -Wall -o CMakeFiles/webqq.dir/translate.c.o   -c /home/mjd/rpmbuild/BUILD/pidgin-lwqq/src/translate.c

等等

CapnKernel commented 9 years ago

That library (liblto_plugin.so) is part of the gcc package:

[mjd@xiaomao ~]$ rpm -q -l gcc | fgrep liblto_plugin.so
/usr/libexec/gcc/x86_64-redhat-linux/4.8.3/liblto_plugin.so
/usr/libexec/gcc/x86_64-redhat-linux/4.8.3/liblto_plugin.so.0
/usr/libexec/gcc/x86_64-redhat-linux/4.8.3/liblto_plugin.so.0.0.0
[mjd@xiaomao ~]$ 

Can you try verifying gcc to make sure it's correctly installed?

[mjd@xiaomao ~]$ rpm -V gcc
[mjd@xiaomao ~]$ 
theburn commented 9 years ago

@CapnKernel , you are right. hello_world.cpp cannot be complied, g++ said:

/usr/include/wchar.h:39:21: fatal error: stdarg.h: No such file or directory

but i can find stdarg.h, i don't know why g++ tell me that . LD_LIBRARY_PATH or PKG_CONFIG_PATH ?

then, i install fedora22 in virtualbox. update, install dev tools , balabala...... and then, install lwqq. God, it's worked now. i reinstall fedora22 on my laptop.

maybe i should find the reason.but take me much more time. my boss angray!

this issue shoud be closed

xiehuc commented 9 years ago

this is a hard work ......

2015-06-30 10:42 GMT+08:00 theburn notifications@github.com:

Closed #652 https://github.com/xiehuc/pidgin-lwqq/issues/652.

— Reply to this email directly or view it on GitHub https://github.com/xiehuc/pidgin-lwqq/issues/652#event-343690744.