lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, 18 Jan 2009, Peter Kümmel wrote:
Leo Razoumov wrote:
Hi Mauro and Peter,
I am trying to build lqt from the git repo master branch (34cbc05a9318)
under Ubuntu-7.04 Feisty Fawn with Qt-4.2.3 and gcc-4.2.1.
I tried both methods described in the BUILD file and they did not work for me.

(1) Using cmake, I got the following compile-time errors:

[[..snip..]


This maybe a problem of my compile-time optimization, I've added option to suppress it.

You could try this build process (which hopefully becomes simpler soon):
1. cmake ../lqt -Dnomerge=1
2. make
-> will generate cpp files but they are not part of the Makefile (GLOB was at 1.)
     will end with linker errors
3. cmake ../lqt -Dnomerge=1
  -> GLOB now finds the generated cpp files
4. make

Peter


Peter,
thanks for the help. I tried your approach and that's where I stand.

I fetched your latest changes from the lqt git repo (b480550f85).

Kubuntu-7.04 Feisty Fawn does not have QtScript and QtWebkit.
So I had to remove them from CMakeLists.txt. My changes are attached in
"feisty.diff" file.

(1) cmake ../lqt -Dnomerge=1
    worked fine!

(2) make
	worked fine!

(3) cmake ../lqt -Dnomerge=1
    worked fine!

(4) make
	gave me really strange compile-time errors. The complete make log is attached
	at the end of this message ("make.log.bz2"). Specific errors follow:

/usr/include/qt4/QtCore/qatomic_i386.h:55: error: previous declaration of ‘int q_atomic_test_and_set_ptr(volatile void*, void*, void*)’ with ‘C++’ linkage
/usr/include/qt4/QtCore/qatomic_parisc.h:34: error: conflicts with new declaration with ‘C’ linkage
/usr/include/qt4/QtCore/qatomic_i386.h:95: error: previous declaration of ‘void* q_atomic_set_ptr(volatile void*, void*)’ with ‘C++’ linkage
/usr/include/qt4/QtCore/qatomic_parisc.h:35: error: conflicts with new declaration with ‘C’ linkage
/usr/include/qt4/QtCore/qatomic_parisc.h:40: error: redefinition of ‘struct QBasicAtomic’
/usr/include/qt4/QtCore/qatomic.h:64: error: previous definition of ‘struct QBasicAtomic’
/usr/include/qt4/QtCore/qatomic_parisc.h:119: error: redefinition of ‘struct QBasicAtomicPointer<T>’
/usr/include/qt4/QtCore/qatomic.h:109: error: previous definition of ‘struct QBasicAtomicPointer<T>’
make[2]: *** [CMakeFiles/qtcore.dir/qtcore_src/qtcore_meta_QBasicAtomic.cpp.o] Error 1
make[2]: Leaving directory `/home/leor/Devel/Lua/lqt.LR.build'
make[1]: *** [CMakeFiles/qtcore.dir/all] Error 2
make[1]: Leaving directory `/home/leor/Devel/Lua/lqt.LR.build'
make: *** [all] Error 2

It seems that Qt-4.2.3 has two declarations of 'q_atomic_test_and_set_ptr' funciton -- one as extern 'C' in qatomic_parisc.h and one as regular C++ function in qatomic_i386.h. GCC-4.1.2 apparently does not like such an ambiguity.

Any suggestions about what I should do to resolve this issue?

Your help and advice is greatly appreciated!

--Leo--
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4087703..a7f5426 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,9 +38,9 @@ find_package(Qt4 REQUIRED)
 set(QT_USE_QTCORE 1)
 set(QT_USE_QTGUI 1)
 set(QT_USE_QTNETWORK 1)
-set(QT_USE_QTWEBKIT 1)
+set(QT_USE_QTWEBKIT 0)
 set(QT_USE_QTOPENGL 1)
-set(QT_USE_QTSCRIPT 1)
+set(QT_USE_QTSCRIPT 0)
 set(QT_USE_QTSVG 1)
 set(QT_USE_QTXML 1)
 #set(QT_USE_QTSQL 1)
@@ -128,6 +128,7 @@ function(build_qt_lib_binding BINDING_HEADER)
 							${BINDING_HEADER} 
 							-C ${PP_CONFIG}
 							-Q ${QT_INCLUDE_DIR} 
+                            -I /usr/include
 							-o ${GEN_XML}
 						COMMENT "Generating XML: running cpptoxml on ${BINDING_NAME} "
 						VERBATIM)
@@ -205,11 +206,11 @@ endif()
 build_qt_lib_binding(QtCore)
 build_qt_lib_binding(QtNetwork QtCore)
 build_qt_lib_binding(QtGui QtNetwork QtCore)
-build_qt_lib_binding(QtScript QtGui QtNetwork QtCore)
+# build_qt_lib_binding(QtScript QtGui QtNetwork QtCore)
 build_qt_lib_binding(QtOpenGL QtGui QtNetwork QtCore)
-build_qt_lib_binding(QtSvg QtScript QtGui QtNetwork QtCore)
-build_qt_lib_binding(QtXml QtSvg QtScript QtGui QtNetwork QtCore)
-build_qt_lib_binding(QtWebKit QtSvg QtScript QtOpenGL QtGui QtNetwork QtCore)
+build_qt_lib_binding(QtSvg QtGui QtNetwork QtCore)
+build_qt_lib_binding(QtXml QtSvg QtGui QtNetwork QtCore)
+# build_qt_lib_binding(QtSvg QtOpenGL QtGui QtNetwork QtCore)
 
 
 

Attachment: make.log.bz2
Description: make.log.bz2