| June 19, 2009 8:00 AM PDT | |
Author: Feilong Huang - Intel Compiler Team
============ Check out source code and compile with gcc ==========
Follow the steps on https://common.helixcommunity.org/2004/devdocs/quickstart.
1. Sign up for a Helix community account at https://helixcommunity.org/.
2. Do
$ mkdir ~/.ssh/
$ ssh-keygen -t dsa -f ~/.ssh/helixid_dsa
3. Go to https://helixcommunity.org/account/editsshkeys.php with your Helix community account and enter the public key that you just created into the "authorized keys" window. Then click the Update button. Wait until the Helix server accept your public key.
4. Create ~/.ssh/config with the following content, where myusername is your Helix community username.
# work around a bug in winsock:
# (this is only needed with cygwin ssh, but should do no harm with others)
ConnectionAttempts=4
# connect to helixcommunity.org:
host=cvs.helixcommunity.org
BatchMode=no
CompressionLevel=9
IdentityFile=~/.ssh/helixid_dsa
User=myusername
5. Test to ensure ssh works correctly. Please refer to https://common.helixcommunity.org/2004/devdocs/quickstart to tell if your ssh works.
$ ssh -l myusername cvs.helixcommunity.org
6. Create a directory as a root directory for your build. Check out the new ribosome.
$ export CVS_RSH=ssh
$ mkdir ~/helix-source
$ cd ~/helix-source
$ cvs -d :ext:myusername@cvs.helixcommunity.org:/cvsroot/ribosome co build
7. Do
$ export BUILD_ROOT=~/helix-source/build
$ export PATH=$BUILD_ROOT/bin:$PATH
Follow the steps on https://helix-client.helixcommunity.org/2004/devdocs/quickstart.
1. Request access to Helix DNA restricted source code.
2. Set System_ID to match the system
$ export SYSTEM_ID=linux-2.2-libc6-gcc32-i586
3. Create ~/.buildrc
AddMultiCVS("helix",":ext:myusername@cvs.helixcommunity.org:/cvsroot/")
AddBIFPath("common", "[helix]/common/build/BIF")
AddBIFPath("client", "[helix]/client/build/BIF")
AddBIFPath("common-restricted", "[helix]/common-restricted/build/BIF")
AddBIFPath("client-restricted", "[helix]/client-restricted/build/BIF")
AddCVS("wmaudiodist",":ext:myusername@cvs.helixcommunity.org:/cvsroot/wmaudio-dist")
AddCVS("wmvideodist",":ext:myusername@cvs.helixcommunity.org:/cvsroot/wmvideo-dist")
4. Create Helix source tree and run build Python script.
$ mkdir helix
$ cd helix
$ build.py
5. Set BIF branch, target and profile as follow. And then build it by doing "3".
[0] Set BIF branch (realplay_gtk_atlas_restricted)
[1] Set Target(s) (player_all)
[2] Set Profile (helix-client-moblin)
[3] run: build –trelease
...
[13] Help Page (full help in build/doc/index.html)
[Q] Quit
6. After the build is completed, you probably will see "5 of 237 modules failed". That is caused by trying to build omx and debian package (if your system is not debian). Remove the ./datatype/omx/ directory. Open ./Makefile, search for player/installer/deb and comment that line. Run build.py and build again. There should be no error now.
============ compile with icc ==========
Recommend to use icc 11.1.064 or later.
1. Go to Helix source root (~/helix-source/helix). Open ./Makefile.
$ cd ~/helix-source/helixMove
$ vi ./Makefile
cd protocol/common/util && $(MAKE) $(SUBMAKEFLAGS) SUBMAKEFLAGS="$(SUBMAKEFLAGS)" -f Makefileahead of
cd protocol/http && $(MAKE) $(SUBMAKEFLAGS) SUBMAKEFLAGS="$(SUBMAKEFLAGS)" -f Makefile
cd client/netwksvc && $(MAKE) $(SUBMAKEFLAGS) SUBMAKEFLAGS="$(SUBMAKEFLAGS)" -f Makefilebecause netwksvc relies on the libs from protocol/common/util & protocol/http.
2. If your system is not Debian-based, please comment out the following line in ./Makefile.
cd player/installer/deb && $(MAKE) $(SUBMAKEFLAGS) SUBMAKEFLAGS="$(SUBMAKEFLAGS)" -f Makefile
3. Find out all makefiles that contain "g++ -shared". NOTE: there are two whitespaces between g++ and -shared.
grep "g++ -shared" `find . -name "*.mak"`Change
grep "g++ -shared" `find . -name "Makefile"`
g++ -sharedto
$(CXX) -sharedThere are tens of makefiles that need this modification.
4. Edit the following files, as a workaround of DPD200136428. You may skip this step first and try to compile dtdrive with icc. You are expected to see a few errors about type conversion while compiling the following files. The fix is to add force type casting, which is very simple. After applying the fix, compile it again.
datatype/text/realtext/renderer/platform/unix/rtwin.cpp
datatype-restricted/rm/video/codec/rv89combo/enc/cinterp4i.cpp
player/hxclientkit/src/platform/unix/CHXClientThumbnailUnix.cpp
player/hxclientkit/src/CHXClientEngineContext.cpp
player/common/dtdr_service/thumbnail_service/thumbnailservice.cpp
player/netbook/medialib/platform/unix/gtkmedialibrary.cpp
player/netbook/medialib/chxmedialibrary.cpp
player/app/gtk/contextmenu.cpp
player/app/gtk/photoslideshow.cpp
player/app/gtk/medialib.cpp
player/app/gtk/clipinfopopup.cpp
player/app/gtk/addtoplaylist.cpp
player/app/gtk/medialibplaylist.cpp
player/app/gtk/mediamanager.cpp
player/app/gtk/deleteclippopup.cpp
5. Workaround for DPD200137075: Since icc 11.1 doesn't support -masm=intel, go to line #85 in ./datatype-restricted/wm/video/codec/wmv9/hxdecoder_shim/wmv9decoderlib_nopic.mak, change
$(CC) $(CCFLAGS) -o rel/obj/wmv9decoderlib_nopic/par1/import/wmv9dec_vc1_rtm/embedsetup/wmpk/wmvv9_dec/slimc/sp2/scrunch/wmv2/decoder_c9/c/interpolate_wmv9.o -c ../import/wmv9dec_vc1_rtm/embedsetup/wmpk/wmvv9_dec/slimc/sp2/scrunch/wmv2/decoder_c9/c/interpolate_wmv9.cto
gcc -masm=intel $(CCFLAGS) -o rel/obj/wmv9decoderlib_nopic/par1/import/wmv9dec_vc1_rtm/embedsetup/wmpk/wmvv9_dec/slimc/sp2/scrunch/wmv2/decoder_c9/c/interpolate_wmv9.o -c ../import/wmv9dec_vc1_rtm/embedsetup/wmpk/wmvv9_dec/slimc/sp2/scrunch/wmv2/decoder_c9/c/interpolate_wmv9.cThe reason why we add -masm=intel here is that we may want to set our own CCFLAGS in command line.
6. Open player/app/gtk/Makefile. Change
g++ -o rel/realplay.bin $(OBJS) rel/realplay.bin_libs.a -L/usr/X11R6/lib -L/lib $(DYNAMIC_LIBS)to
$(CXX) -o rel/realplay.bin $(OBJS) rel/realplay.bin_libs.a -L/usr/X11R6/lib -L/lib $(DYNAMIC_LIBS)
7. (Optional) Open player/app/gtk/about.cpp, and change
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)to
#if defined(__INTEL_COMPILER)
misc_build_info_markup = g_strdup_printf(_("Built with icc %d.%d (build %d) on %s"),
__INTEL_COMPILER / 100,
(__INTEL_COMPILER % 100) / 10,
__INTEL_COMPILER_BUILD_DATE,
__DATE__);
#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
8. Build the project. Realplayer RPM package will be generated.
make CC=icc CXX=icpc SUBMAKEFLAGS="CC=icc CXX=icpc"
Realplayer built with icc depends on some dynamic libraries coming from icc. So before running it, please make sure you have them in your system. Otherwise, download the package named "Redistributable Libraries", which contains all required dynamic libraries, and install it. And set LD_LIBRARY_PATH properly.
$ export LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/064/lib/ia32:$LD_LIBRARY_PATH
Do you need more help?
This article applies to: Intel® C++ Compiler for Linux* Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (0) 
Trackbacks (1)
- New Web Development Community Forrst Blows Up on the Web | twittersRus.info
July 5, 2010 2:13 PM PDT
Leave a comment 
To obtain technical support, please go to Software Support.
Author
Feilong H. (Intel)
|

