Onega

a lot of VC++ posts, a few C# posts, and some miscellaneous stuff

Saturday, December 29, 2012

Build qt-everywhere-opensource-src-5.0.0.tar.gz on CentOS 6.3 64bit

Here is my notes of building qt-everywhere-opensource-src-5.0.0.tar.gz on CentOS 6.3 64bit.
Actually I started on CentOS 5.6 32bit, but got some opengl related compile errors. Even "-no-opengl" is passed to configure, but there are still a lot of opengl related compile errors. So I thought opengl on CentOS is too old and switched to CentOS 6.3. But there are opengl errors with "-no-opengl" option too. At last I installed gtkglext-devel and removed "-no-opengl" option. The following is working on my system.
tar xvzf /mnt/host_c/workspace/qt-everywhere-opensource-src-5.0.0.tar.gz
sudo yum install gtkglext-devel.i686 gtkglext-devel.x86_64
./configure -prefix %CD%\qtbase -opensource -confirm-license -no-xcb  -nomake tests -nomake examples -nomake demos; time gmake
[onega@localhost qt-everywhere-opensource-src-5.0.0]$ du -hs .
1.9G
[onega@localhost qt-everywhere-opensource-src-5.0.0]$ cat qtbase/config.summary

Build type: linux-g++-64
Architecture:  x86_64, features: mmx sse sse2
Host architecture: x86_64, features: mmx sse sse2
Platform notes:

        - Also available for Linux: linux-kcc linux-icc linux-cxx
  
Build .................. libs tools
Configuration ..........  qpa largefile precompile_header sse2 sse3 ssse3 sse4_1 sse4_2 avx pcre  minimal-config small-config medium-config large-config full-config fontconfig evdev xlib xrender linuxfb c++11 accessibility opengl shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-png png system-freetype system-zlib nis iconv glib rpath concurrent audio-backend v8 v8snapshot release
Debug .................. no
C++11 support .......... yes
pkg-config ............. yes
QtDBus module .......... no
QtConcurrent code ...... yes
QtGui module ........... yes
QtWidgets module ....... yes
JavaScriptCore JIT ..... To be decided by JavaScriptCore
QML debugging .......... yes
PCH support ............ yes
SSE2/SSE3/SSSE3......... yes/yes/yes
SSE4.1/SSE4.2........... yes/yes/yes
AVX/AVX2................ yes/no
IPv6 ifname support .... yes
getaddrinfo support .... yes
getifaddrs support ..... yes
Accessibility .......... yes
NIS support ............ yes
CUPS support ........... no
Iconv support .......... yes
Glib support ........... yes
GStreamer support ...... no
PulseAudio support ..... no
Large File support ..... yes
GIF support ............ plugin
JPEG support ........... plugin (qt)
PNG support ............ yes (system)
zlib support ........... system
Session management ..... auto
libudev support ........ no
Use system proxies ..... no
OpenGL support ......... yes (Desktop OpenGL)
OpenVG support ......... no
XShape support ......... auto
XVideo support ......... auto
XSync support .......... auto
Xinerama support ....... runtime
Xcursor support ........ runtime
Xfixes support ......... runtime
Xrandr support ......... runtime
Xi support ............. runtime
Xi2 support ............ auto
MIT-SHM support ........ auto
FontConfig support ..... yes
XKB Support ............ auto
GTK theme support ...... no
SQLite support ......... plugin (qt)
OpenSSL support ........ no
Alsa support ........... no
libICU support ......... no
PCRE support ........... qt
Xcb support ............ no
Xrender support ........ yes
EGLFS support .......... no
DirectFB support ....... no
LinuxFB support ........ yes
KMS support ............ no

Friday, December 28, 2012

Build ACE+TAO-6.1.6.tar.bz2 as static library on CentOS 5.6

### For my own notes, here is a script to build ACE+TAO-6.1.6.tar.bz2 as static library on CentOS 5.6
#tar xvjf /mnt/host_c/Users/onega/Downloads/ACE+TAO-6.1.6.tar.bz2

export ACE_ROOT=~/workspace/ACE_wrappers
echo '#include "ace/config-linux.h"' > $ACE_ROOT/ace/config.h
rm $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'shared_libs=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs_only=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'no_hidden_visibility=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'debug=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'ACE_COMPONENTS=FOR_TAO' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'shared_libs=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs_only=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'no_hidden_visibility=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'debug=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'ACE_COMPONENTS=FOR_TAO' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
cd $ACE_ROOT/ace
make clean ; time make
cd $ACE_ROOT/apps/gperf/src ; time make  >> $ACE_ROOT/tao-dll-release.txt
export TAO_ROOT=$ACE_ROOT/TAO
export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
cd $TAO_ROOT/TAO_IDL ; time make   >> $ACE_ROOT/tao-dll-release.txt
cd $TAO_ROOT/tao ;make clean; time make   >> $ACE_ROOT/tao-dll-release.txt
cd $TAO_ROOT/orbsvcs ; time make   >> $ACE_ROOT/tao-dll-release.txt
cd $TAO_ROOT/examples/Simple/echo; time make >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $ACE_ROOT/ace/libACE.a >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/tao/libTAO.a >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $ACE_ROOT/ace/libACE.so.* >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/tao/libTAO.so.* >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/TAO_IDL/tao_idl >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/examples/Simple/echo/client >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/examples/Simple/echo/server >> $ACE_ROOT/tao-dll-release.txt

###########################################################################
Define two macros in your own project.
-DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS
TAO libraries must be linked in correct order.
g++ -O3 -pthread -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0  -DNDEBUG  -I/home/onega/workspace/ACE_wrappers -DACE_NDEBUG -D__ACE_INLINE__ -I../../../.. -I../../.. -I../../../orbsvcs -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS  -L/home/onega/workspace/ACE_wrappers/lib -L.  -L../../../../lib  -o server .obj/Echo_i.o .obj/Simple_util.o .obj/server.o .obj/EchoS.o .obj/EchoC.o -lTAO_Utils -lTAO_PI -lTAO_CodecFactory -lTAO_PortableServer -lTAO_IORTable -lTAO_CosNaming -lTAO_AnyTypeCode -lTAO -lACE -ldl -lrt

Thursday, December 06, 2012

Use CDT Juno to build 32bit application on CentOS 6.3 64bit

Before I setup CDT, some other packages have been installed. I am not going to find out which one is unnecessary.
yum groupinstall "Development Tools"
yum install glibc.i686
yum install libstdc++.i686
yum install gtk2-devel.i686 libxml2-devel.i686 libxslt-devel.i686 ncurses-devel.i686 vte-devel.i686   
yum install bison flex gcc-c++ nkf subversion rdesktop


yum install alacarte
yum install java-1.7.0-openjdk.x86_64
tar -zxvf ~/Downloads/eclipse-cpp-juno-SR1-linux-gtk-x86_64.tar.gz
su
mkdir /opt/cdtjuno
mv ~/eclipse /opt/cdtjuno

exit
“System” -> “Preference...” -> “Main Menu”
specify -m32 as g++ compiler and linker option.
g++ -m32 -o "test32"  ./src/test32.o   
/usr/bin/ld: crt1.o: No such file: No such file or directory
solution:
yum install glibc-devel.i686
yum install libstdc++-devel.i686

Labels: