Personal tools
You are here: Home Forum Install & build Successful build on Ubuntu 8.04

Successful build on Ubuntu 8.04

Up to Install & build

Successful build on Ubuntu 8.04

Posted by Manav Bhatia at May 07. 2008
Hi,

   I have built salome 3.2.6 on Ubuntu 8.04. Some modifications were needed to the source and I have listed them in this email. I have run a couple of tests and things seem to be working ok so far. This is not an automated build process, hence a some manual tweaking will be needed.


This file lists the changes to build salome. The 3.2.6 package is
being used, and the changes made are listed below:

-- the build script (and not the installer GUI) was used from the command line to build the package. To build the dependency packages, goto the Install.../config_files directory and type the following:
   ./{package}.sh [install_binary | install_source] {tmp_build_dir}
   {package_dir} {install_dir}

-- following lines are added before the ./configure commands in the
   build script for tcl8.4.5
   check_job ${PRODUCT_DIR}/CONFIGURE.LOG aclocal
   check_job ${PRODUCT_DIR}/CONFIGURE.LOG autoconf
   This is so that the aclocal and configure scripts are regenerated
   for the local machines.
 
    next, the following lines are added to the configure.in file for tcl8.4.5
   AC_SUBST(EXTRA_CFLAGS)
   AC_SUBST(MKLINKS_FLAGS)
   AC_SUBST(SHLIB_LD_FLAGS)
   The tar.gz package is built again with these changes

-- the same is to be done for tk8.4.5

-- for compilation of qt-3.3.4, the following flag had to be added to
   the configuration script, since it was otherwise unable to find the
   freetype/internal headers, which are a part of the freetype source
   package, and not the development headers. The freetype packge was
   downloaded (2.1.10 was used, since the latest 2.3.x was
   incompatible with this version of qt). The following was added to
   the configure options of qt in the build script of qt3.3.4 (note that this is not the installation directory, but the directory of the freetype source package).

   -I/home/manav/packages/freetype/freetype-2.1.10/include

-- used the patches for some files in the occ package, and it compiled
   ok. The patch file was obtained from this page: http://homepages.cae.wisc.edu/~kraftche/OCC/patches.html
   The patch is called occ6.2.patch. Note that the patch on this website is suited for the OCC source code downloaded from the OCC website. The one available with salome is slightly different in organization, but the source files seem to be the same. I manually applied the changes to the source code by skipping all the patches to the configure scripts. There aren't too many changes, hence, it is doable by hand.

-- for med, the script was unable to find the hdf path, and hence,
   this was added to the configure command in med build script file.

-- the configure script was having problems for CMAKE. The prebuilt
   binaries for 1.6.7 were downloaded from cmake.org/files and used to
   build VTK. The build script for VTK-4.2.6 had to be modified by
   commenting out any lines that built the cmake utility, and the
   cmake-1.6.6/Sources/cmake was modified to cmake-1.6.6/bin/cmake
   Some definitions of a few functions had to be added to a few cxx
   files in the VTK source. The vtk environment variables were added to the
   KERNEL_SRC_3.2.6/salome.sh file.

-- following this, KERNEL was built with the following command
    ./build.sh -bcdoi KERNEL
    However, before this, the environment variables have to be set by
    sourcing the salome.sh (in KERNEL_SRC directory) file. Please note that the enviromnent variables for LD_LIBRARY_PATH, and {package}_ROOT_DIR had to be added to this file, since it was not automatically done.

    In addition to this, a change had to be made in the configure.ac
    file to be able to build the configure script. This is because for
    testing the hdf library, libz was not being added to the library
    list during linking. Hence, the following command was added to
    configure.ac to add the library:

    dnl add library libz :
    AC_CHECK_LIB(z,compress2)

-- for installation of GUI module, a newline had to be inserted at the
   end of the file adm_local/unix/config_files/check_vtk.m4 in the
   GUI_SRC directory. This was otherwise preventing the aclocal
   command from succeeding.
   The check for z library also had to be added (like that for KERNEL).

  
-- The ckeck for z library was added to the configure.in.base file as
   for GUI.

-- For compilation of MED, the first line of build_configure script
   had to be changed from /bin/sh to /bin/bash.
   This also needed some small changes in the source code,
   particularly about definition of namespace for a few friend
   operators.


-- For SMESH, the check for z library was added to the
   configure.in.base file.

-- For VISU, the check for z library was added to the
   configure.in.base file.

-- For SUPERV, the check for z library was added to the
   configure.in.base file.

-- For NETGENPLUGIN, the check for z library was added to the
   configure.in.base file.

-- For COMPONENT, the check for z library was added and the /bin/sh
   was changed to /bin/bash for build_configure.

-- For CALCULATOR, the /bin/sh was changed to /bin/bash for
   build_configure. Also, the following was added to the
   configure.in.base file
   dnl Library libdl :
   AC_CHECK_LIB(dl,dlopen)

   dnl add library libm :
   AC_CHECK_LIB(m,ceil)


   dnl add library libz :
   AC_CHECK_LIB(z,compress2)

   and the following was added to add the pthread option to
   compilation for testing hdf. Without this, hdf was not being
   properly tested, and was being disabled for the module.
   echo
   echo ---------------------------------------------
   echo testing threads
   echo ---------------------------------------------
   echo

   ENABLE_PTHREADS


This should give some people enough background to build their package.

Regards,
Manav


Re: Successful build on Ubuntu 8.04

Posted by Adam Powell at May 08. 2008
Congrats, this is great news!  It sounds like you were able to get VTK 4 to build, and omniORB 4.0 and the Qt/SIP versions in Hardy work well.  And your build-in-place method is a lot simpler than what's needed to make a .deb, so this is a great complement to that package.

It's going to take a very long time to complete the OpenCASCADE license audit, so although my package builds in Debian unstable (with VTK5, omniORB 4.1 and Qt/SIP which require changes), it will be a while before it can enter Debian proper, let alone Ubuntu.  I welcome any help you and others on this forum can give auditing the OCC and Salomé sources for this purpose -- we need a complete list of the copyright holders and licenses in each package.  See http://www.opennovation.org/audits/ for details.

Re: Successful build on Ubuntu 8.04

Posted by Atzaru at June 11. 2008
Hi Manav,
It is very encouraging hearing that you did succeed to install Salome on Hardy. I would like to ask you if you have tried on hardy64 bit also or your installation was just on a 32 bit machine. I tried to follow your steps but i did not succeed to install Salome until now.

Does anybody know when the new Salome version will be released  and if Ubuntu will be between supported distributions?

Best regards
 
Atzaru

Re: Successful build on Ubuntu 8.04

Posted by Manav Bhatia at June 11. 2008
Atzaru wrote:
Hi Manav,
It is very encouraging hearing that you did succeed to install Salome on Hardy. I would like to ask you if you have tried on hardy64 bit also or your installation was just on a 32 bit machine. I tried to follow your steps but i did not succeed to install Salome until now.

Does anybody know when the new Salome version will be released  and if Ubuntu will be between supported distributions?

Best regards
 
Atzaru


Hi Atzaru,

I compiled the code on a 32 bit machine. What kind of errors do you get? If I find them familiar, I might be able to help you with them.

Regards,
Manav

Re: Successful build on Ubuntu 8.04

Posted by Atzaru at June 12. 2008
Hi
 After the installation I can successfully start Salome. The geometry module seems to be working correctly but when I start the mesh module I get the following error:

"Can not load libSMESH.so. libg2c.so.0: wrong ELF class: ELFCLASS64"

$ locate libSMESH.so
/home/cfd/salome_3.2.6/SMESH_3.2.6/lib/salome/libSMESH.so

$ locate libg2c.so.0
/usr/lib/libg2c.so.0
/usr/lib/libg2c.so.0.0.0

Any help or indication will be highly appreciated.
Atzaru

Re: Successful build on Ubuntu 8.04

Posted by BrendaEM at June 18. 2008
Getting a successful build on Ubuntu would is good news.

Making a Ubuntu .deb seems like a good addition to the download page, but making it available for  apt-get would be smarter yet, as all the depends could be resolved.

According to distrowatch Ubuntu probably has nearly as much brainshare as all the other Salome offered Linux--combined.

From: http://distrowatch.com/
    2357 Ubuntu
    1403 Mandriva
    894 Debian

Re: Successful build on Ubuntu 8.04

Posted by BrendaEM at June 18. 2008

Re: Successful build on Ubuntu 8.04

Posted by Manav Bhatia at June 18. 2008
Atzaru wrote:
Hi
 After the installation I can successfully start Salome. The geometry module seems to be working correctly but when I start the mesh module I get the following error:

"Can not load libSMESH.so. libg2c.so.0: wrong ELF class: ELFCLASS64"

$ locate libSMESH.so
/home/cfd/salome_3.2.6/SMESH_3.2.6/lib/salome/libSMESH.so

$ locate libg2c.so.0
/usr/lib/libg2c.so.0
/usr/lib/libg2c.so.0.0.0

Any help or indication will be highly appreciated.
Atzaru

Hi Atzaru, I am sorry for not being able to get back to you earlier.
Honestly speaking, I am unable to figure out a reason for your error. However, it seems like some mismatch of the binary type of one of the libraries you are using.
In case you do manage to sort this out, I would like to know. Regards, Manav

Re: Successful build on Ubuntu 8.04

Posted by Manav Bhatia at June 18. 2008
BrendaEM wrote:
Getting a successful build on Ubuntu would is good news.

Making a Ubuntu .deb seems like a good addition to the download page, but making it available for  apt-get would be smarter yet, as all the depends could be resolved.

According to distrowatch Ubuntu probably has nearly as much brainshare as all the other Salome offered Linux--combined.

From: http://distrowatch.com/
    2357 Ubuntu
    1403 Mandriva
    894 Debian


Hi,
I agree that it would be nice to have a .deb. However, there seem to be some incompatibilities between the latest ubuntu packages and the salome 3.2.6 source. Hence, I decided to use the source packages that came with salome itself.
From previous posts it seems that there is some development work (by the developers of salome) going on to improve upon this dependency, however, we do not have access to that source code, and there is no indication about when it will be released. There have been independent efforts by other users, like Adam Powell, to work out these dependencies, but I am not sure of how far he was able to get.
As for my binary, I could upload it to a website, if others would like to download and use. I am not sure of the legal aspects of the same though.
Regards,
Manav

Re: Successful build on Ubuntu 8.04

Posted by BrendaEM at June 19. 2008
I'd want to try some meshing with Salome, but I'm not confident I can modify the source, and build and get all the depends.

Also I'm running 64bit Ubuntu. Did you build 32 or 64?

As for the legal issues, and closed source?
"SALOME : The Open Source Integration Platform for Numerical Simulation"

[It's also odd that many CAE/FEM projects want to keep tabs on who's using them.]

Re: Successful build on Ubuntu 8.04

Posted by BrendaEM at June 19. 2008
Oh, the sad license issues....
http://www.salome-platform.org/forum/forum_13/thread_1053

I've done a few some hollow, Impact studies, but my hopes of doing FEA and CFD are fleeting.
I'm still having workflow problems, and meshing is a great part it.
I can't get surfaces into Gmsh for meshing, and I was hoping to try Salome.

Re: Successful build on Ubuntu 8.04

Posted by Atzaru at June 19. 2008
Hi,
After all i succeed building Salome but i have been using the package from CAELinux. Seems to work on ubuntu 64 but i need to further test it.

link to the package: http://www.caelinux.com/forms/dlsalomemeca2008.html


for instalation:
tar xzf SALOME-MECA-2008.1-GPL.tgz
and follow the README

Atzaru

Re: Successful build on Ubuntu 8.04

Posted by Atzaru at June 19. 2008
Hi,
After all i succeed building Salome but i have been using the package from CAELinux. Seems to work on ubuntu 64 but i need to further test it.

link to the package: http://www.caelinux.com/forms/dlsalomemeca2008.html


for installation:
tar xzf SALOME-MECA-2008.1-GPL.tgz
and follow the README

Atzaru

Re: Successful build on Ubuntu 8.04

Posted by Andriy Andreykiv at August 22. 2008
Dear Manav and other Salome fans,

Could you please advise me on the problem related to building Salome modules on Ubuntu 64.
I'm trying to build a program that uses MED (MEDMEM) module. Everything was working fine for importing meshes and groups.
But, as soon as I tried to build fields on the imported meshes, I'm getting a strange linking problem that I cannot resolve:


FIELDcreate.o: In function `MEDMEM::MED_FIELD_WRONLY_DRIVER21::write() const':
FIELDcreate.cxx:(.text._ZNK6MEDMEM25MED_FIELD_WRONLY_DRIVER21IdE5writeEv[MEDMEM::MED_FIELD_WRONLY_DRIVER21::write() const]+0x29d): undefined reference to `med_2_1::MEDchampInfo(int, int, char*, med_2_1::med_type_champ*, char*, char*, int)'
FIELDcreate.cxx:(.text._ZNK6MEDMEM25MED_FIELD_WRONLY_DRIVER21IdE5writeEv[MEDMEM::MED_FIELD_WRONLY_DRIVER21::write() const]+0x82e): undefined reference to `med_2_1::MEDchampCr(int, char*, med_2_1::med_type_champ, char*, char*, int)'
FIELDcreate.cxx:(.text._ZNK6MEDMEM25MED_FIELD_WRONLY_DRIVER21IdE5writeEv[MEDMEM::MED_FIELD_WRONLY_DRIVER21::write() const]+0xac5): undefined reference to `med_2_1::MEDchampEcr(int, char*, char*, unsigned char*, med_2_1::med_mode_switch, int, int, int, char*, med_2_1::med_mode_acces, med_2_1::med_entite_maillage, med_2_1::med_geometrie_element, int, char*, double, int)'
FIELDcreate.o: In function `MEDMEM::MED_FIELD_DRIVER21::createFieldSupport(int, std::basic_string, std::allocator >&, int, int, MEDMEM::SUPPORT&, std::vector >&, std::basic_string, std::allocator >&;) const':
FIELDcreate.cxx:(.text._ZNK6MEDMEM18MED_FIELD_DRIVER21IdE18createFieldSupportEiRSsiiRNS_7SUPPORTERSt6vectorIiSaIiEES2_[MEDMEM::MED_FIELD_DRIVER21::createFieldSupport(int, std::basic_string, std::allocator >&, int, int, MEDMEM::SUPPORT&, std::vector >&, std::basic_string, std::allocator >&;) const]+0x2f1): undefined reference to `med_2_1::MEDnVal(int, char*, med_2_1::med_entite_maillage, med_2_1::med_geometrie_element, int, int)'
FIELDcreate.cxx:(.text._ZNK6MEDMEM18MED_FIELD_DRIVER21IdE18createFieldSupportEiRSsiiRNS_7SUPPORTERSt6vectorIiSaIiEES2_[MEDMEM::MED_FIELD_DRIVER21::createFieldSupport(int, std::basic_string, std::allocator >&, int, int, MEDMEM::SUPPORT&, std::vector >&, std::basic_string, std::allocator >&;) const]+0x31a): undefined reference to `med_2_1::MEDnVal(int, char*, med_2_1::med_entite_maillage, med_2_1::med_geometrie_element, int, int)'
FIELDcreate.cxx:(.text._ZNK6MEDMEM18MED_FIELD_DRIVER21IdE18createFieldSupportEiRSsiiRNS_7SUPPORTERSt6vectorIiSaIiEES2_[MEDMEM::MED_FIELD_DRIVER21::createFieldSupport(int, std::basic_string, std::allocator >&, int, int, MEDMEM::SUPPORT&, std::vector >&, std::basic_string, std::allocator >&;) const]+0x419): undefined reference to `med_2_1::MEDpasdetempsInfo(int, char*, med_2_1::med_entite_maillage, med_2_1::med_geometrie_element, int, char*, int*, int*, char*, double*, int*)'
FIELDcreate.o: In function `MEDMEM::MED_FIELD_RDONLY_DRIVER21::read()':
FIELDcreate.cxx:(.text._ZN6MEDMEM25MED_FIELD_RDONLY_DRIVER21IdE4readEv[MEDMEM::MED_FIELD_RDONLY_DRIVER21::read()]+0x421): undefined reference to `med_2_1::MEDchampInfo(int, int, char*, med_2_1::med_type_champ*, char*, char*, int)'
FIELDcreate.cxx:(.text._ZN6MEDMEM25MED_FIELD_RDONLY_DRIVER21IdE4readEv[MEDMEM::MED_FIELD_RDONLY_DRIVER21::read()]+0x1294): undefined reference to `med_2_1::MEDnVal(int, char*, med_2_1::med_entite_maillage, med_2_1::med_geometrie_element, int, int)'
FIELDcreate.cxx:(.text._ZN6MEDMEM25MED_FIELD_RDONLY_DRIVER21IdE4readEv[MEDMEM::MED_FIELD_RDONLY_DRIVER21::read()]+0x154c): undefined reference to `med_2_1::MEDchampLire(int, char*, char*, unsigned char*, med_2_1::med_mode_switch, int, char*, med_2_1::med_entite_maillage, med_2_1::med_geometrie_element, int, int)'
collect2: ld returned 1 exit status
make: *** [FIELDcreate] Error 1


The build command was:
g++ -o FIELDcreate  -L/home/andrico/salome_3.2.6/med-2.2.3/lib -L/home/andrico/salome_3.2.6/MED_3.2.6/lib64/salome -L/home/andrico/salome_3.2.6/hdf5-1.6.4/lib FIELDcreate.o   -lmedmem -lmed -lmed_V2_1 -lhdf5 -lz -pthread

Actually, this is the build not even for my program, but for the test program in the MED module.

Thanks in advance,
                                  Andriy


Re: Successful build on Ubuntu 8.04

Posted by JMB at August 31. 2008
Atzaru wrote:
Hi,
After all i succeed building Salome but i have been using the package from CAELinux. Seems to work on ubuntu 64 but i need to further test it.

and follow the README

Atzaru


Hello:

I am trying to get Salome 3.2.9 running in Ubuntu 8.04 64bit.  After launching I see the "Splash" screen and then nothing else happens.  Could you be more specific about which README you are referring to please, there are numerous README file in the package!  I have read several of them and there seem to be not specific instructions for 64bit installations.  Thank you.

Regards,
JMB

find ./ -name README -print
./SALOME/SALOME3/prerequis/debianForSalome-v1_2_0/lib/python2.3/test/README
./SALOME/SALOME3/prerequis/debianForSalome-v1_2_0/lib/python2.3/site-packages/README
./SALOME/SALOME3/prerequis/debianForSalome-v1_2_0/lib/python2.3/distutils/README
./SALOME/SALOME3/prerequis/debianForSalome-v1_2_0/lib/gcc-lib/i486-linux/3.3.5/include/README
./SALOME/SALOME3/prerequis/CAS-6.2sp3/src/WOKTclLib/README
./SALOME/SALOME3/V3_2_9NoDebug/GEOM_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/CALCULATOR_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/HELLO1_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/PYHELLO1_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/KERNEL_V3_2_9NoDebug/bin/salome/appliskel/README
./SALOME/SALOME3/V3_2_9NoDebug/XDATA_V3_2_9NoDebug/share/xdata/templates/MEDFIELDCREATOR_SRC/README
./SALOME/SALOME3/V3_2_9NoDebug/XDATA_V3_2_9NoDebug/share/xdata/templates/TECHOBJ_ROOT/README
./SALOME/SALOME3/V3_2_9NoDebug/SUPERV_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/MED_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/GUI_V3_2_9NoDebug/adm_local/unix/config_files/README
./SALOME/SALOME3/V3_2_9NoDebug/COMPONENT_V3_2_9NoDebug/adm_local/unix/config_files/README
./aster/outils/metis-edf-4.0/Test/README
./aster/outils/gibi-2000/README
./SALOME-MECA/prerequis/xpdf-3.02-linux/README



Powered by Ploneboard
Document Actions