Re: [CMake] Trouble finding libjpeg package on ubuntu

2017-05-29 Thread Michele Portolan

Did you install the dev version of the library?


Michele


On 29/05/17 03:37, Aaron Boxer wrote:

Hello,
I would like cmake to find the libjpeg installation on my ubuntu system.

I have the

find_package(jpeg) line in my cmake file, and this works on windows, 
but on

Ubuntu with libjpeg-turbo installed, it can't find it.

Here is a list of the install directories for the libjpeg-turbo8-dev 
package:


/.
/usr
/usr/include
/usr/include/turbojpeg.h
/usr/include/jerror.h
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/jconfig.h
/usr/include/jmorecfg.h
/usr/include/jpegint.h
/usr/include/jpeglib.h
/usr/share
/usr/share/doc
/usr/share/doc/libjpeg-turbo8-dev
/usr/share/doc/libjpeg-turbo8-dev/copyright
/usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz
/usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz
/usr/share/doc/libjpeg-turbo8-dev/README.gz
/usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libturbojpeg.a
/usr/lib/x86_64-linux-gnu/libjpeg.a
/usr/lib/x86_64-linux-gnu/pkgconfig


Any help would be greatly appreciated.

Thanks!

Aaron







-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Toggle Absolute paths in Eclipse Generator

2017-03-28 Thread Michele Portolan

Hello,

I am trying to use the Eclipse Generator to create a project to be 
exported to Eclipse. Everything works fine, but when I look at the 
generated .cproject and .project I see that all paths are absolute, like 
for instance:


-E chdir 
"/home/portolan/my_project/Optional_Libs/eclipse_build/Server" 
"/usr/bin/cmake" -P 
"CMakeFiles/ATE_Loopback_Server.dir/cmake_clean.cmake"



This is not really good because I would like to copy my project to 
another machine where I do not have /home/portolan/.


So I have two questions: Can I ask cmake to

 - generate relative paths instead of absolute?

 - copy the sources locally to the Eclipse project, rather than use the 
external ones?



Thanks,


Michele

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Link to local glibc

2017-03-13 Thread Michele Portolan

At the end of the day, here is what I did:

 1) create a development Centos 5.5 machine

 2) on the dev machine, I compiled gcc 4.9.3 from sources, installed it 
locally and updated the build system (cmake, etc..) with only local 
builds, if possible from source. By exploiting LD_LIBRARY_PATH, I link 
to the glibc et al. in the gcc 4.9.3 installation path


 3) I run Cmake on the dev machine, to obtain the executables and libraries

 4) I prepare a distribution with the Cmake-built exe and libs, and in 
case of dynamic linking, the dependecies found by ldd


 5) I unpack the distribution on my target Cento0S 5.5 machine and run 
the execs, if needed using LD_LIBRARY_PATH for the local libs



Quite the workaround, but it works better than manually handling all 
glibc dependencies!



Michele


On 08/03/17 17:57, Chuck Atkins wrote:


I'll try and see if I can compile a gcc 4.9.3 chain on the CentOS
5 machine (I need C++11).

I'd suggest using the devtollset repo from 
https://people.centos.org/tru/devtools/devtools.repo


The docker container looks interesting but I haven't used it yet:
does it need some specific install on the target machine? I don't
have any install rights on the Cento 5.11 machine


I think you misunderstand.  I meant to use a docker container on your 
Ubuntu machine running CentOS 5 as a development environment.  That 
way you can use your Ubuntu workstation to build in a CentOS 5 
environment.


- Chuck



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Link to local glibc

2017-03-07 Thread Michele Portolan
I'll try and see if I can compile a gcc 4.9.3 chain on the CentOS 5 
machine (I need C++11).


The docker container looks interesting but I haven't used it yet: does 
it need some specific install on the target machine? I don't have any 
install rights on the Cento 5.11 machine


Thanks,


Michele


Le 07/03/2017 à 22:33, Chuck Atkins a écrit :
If you're using a newer Ubuntu environment, I'd suggest using a CentOS 
5 docker container.   Either that or the VM.


- Chuck

On Tue, Mar 7, 2017 at 1:53 PM, Marcel Loose <lo...@astron.nl 
<mailto:lo...@astron.nl>> wrote:


Hi Michele,

This could become a painful exercise. You basically have two options:
1) Treat it as a cross-compilation project, or
2) Create a virtual machine running CentOS 5.8 and do the build there.
If I were you, I would go for the second option.

Cheers,
Marcel.

Op 07-03-17 om 17:56 schreef Michele Portolan:
> Hello,
>
> I build on a Ubuntu machine (kernel 4.4.0-64-generic), but I need my
> program to be executed on an old Cento 5.8 (kernel 2.6.18). I tried
> compiling with "-static" to have static linking, but when I try to
> execute I get "ERROR: Kernel too old!"
>
> I therefore locally compiled a glibc with support for kernel
2.6.18 ...
> but how can I have Cmake use it instead of the system one?
>
> Thanks,
>
>
> Michele
>



--

Powered by www.kitware.com <http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
<http://www.cmake.org/Wiki/CMake_FAQ>

Kitware offers various services to support the CMake community.
For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
<http://cmake.org/cmake/help/support.html>
CMake Consulting: http://cmake.org/cmake/help/consulting.html
<http://cmake.org/cmake/help/consulting.html>
CMake Training Courses: http://cmake.org/cmake/help/training.html
<http://cmake.org/cmake/help/training.html>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
<http://www.kitware.com/opensource/opensource.html>

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
<http://public.kitware.com/mailman/listinfo/cmake>






-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Link to local glibc

2017-03-07 Thread Michele Portolan

Hello,

I build on a Ubuntu machine (kernel 4.4.0-64-generic), but I need my 
program to be executed on an old Cento 5.8 (kernel 2.6.18). I tried 
compiling with "-static" to have static linking, but when I try to 
execute I get "ERROR: Kernel too old!"


I therefore locally compiled a glibc with support for kernel 2.6.18 ... 
but how can I have Cmake use it instead of the system one?


Thanks,


Michele

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] ExternalProject_add not buing launched

2017-02-27 Thread Michele Portolan

Hello,

I am trying to set my Cmake project to build the "xmlrpc-c" library, 
which is built using autotools. I was somewhat able to set it up 
following this example: 
http://mirkokiefer.com/blog/2013/03/cmake-by-example/


My resulting CMakeList is the following:

ExternalProject_Add( project_xmlprc
  SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc-c"
  PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc-c"
  CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc-c/configure 
--prefix=${CMAKE_CURRENT_BINARY_DIR}/xmlrpc-c/

  BUILD_COMMAND make
  INSTALL_COMMAND make install
  BUILD_IN_SOURCE 1
)

ExternalProject_Get_Property(project_xmlprc install_dir)


add_library(xmlprc SHARED IMPORTED)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc++.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_packetsocket.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_client.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_client++.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_server++.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_server_abyss++.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_util.so)
set_property(TARGET xmlprc PROPERTY IMPORTED_LOCATION 
${install_dir}/lib/libxmlrpc_util++.so)

add_dependencies(xmlprc project_xmlprc)

It sort of works, meaning I can see the library being built in 
${CMAKE_CURRENT_BINARY_DIR}/xmlrpc-c/.


My problem is that the build is launched only the first time! If I 
delete the ${CMAKE_CURRENT_BINARY_DIR} and re-launch cmake, the 
ExternalProjet is not rebuilt. To have a rebuild, I have to do this 
strange workaround:


  - modify "BUILD_IN_SOURCE" to 0

 - run cmake+make. I get an error as xmlrpc only support in-source build

 - put "BUILD_IN_SOURCE"back to 1

 - run cmake+make. This time it works.


Looks like it is some issue in the source tree remaining dirty, but even 
running a "make distclean" does not change anything, I need to do the 
workaround.


Any idea of where the problem lies?

Thanks,


Michele



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Comaptibility with older gcc

2017-01-28 Thread Michele Portolan

Thanks for all the feedback.

I cannot go into the details, but the deployment target is a production 
machine for which I have no installation privileges, and where 
"stability is king", so asking for updates is out of the question. I am 
offered an Eclispe environment and have to work on it, hence my idea of 
importing the cmake-built library (static or dynamic, whichever works 
better) into the Eclipse projet and include it.


I was also doubting about libstdc++ versions, is there maybe a way of 
asking Cmake to statistically include it in the built library?


Regards,


Michele


Le 27/01/2017 à 19:08, Hendrik Sattler a écrit :

If the target platform has an adapted gcc  that does not match upstream gcc, or 
may not be possible to just compile a newer version. Or it is a discontinued 
arch.


Am 27. Januar 2017 19:05:09 MEZ schrieb "Elizabeth A. Fischer" 
<elizabeth.fisc...@columbia.edu>:

C++ code is not compatible between different compilers.  You cannot
link
C++ code built with GCC 4.9.3 with GCC 4.2.1.  Maybe if you hack around
and
find the GNU C++ libraries from your GCC 4.9.3 installation... just
maybe,
with enough hacking, it will work.  But in general, this is a rabbit
hole
that will offer you very little in the end.

The standard way to build on systems that don't have the compilers you
need
is... to get the compilers you need.  My point was that getting these
compilers is actually not very hard.  In the end, that will almost
certainly be the easiest solution to your problem.


On Fri, Jan 27, 2017 at 12:58 PM, Hendrik Sattler
<p...@hendrik-sattler.de>
wrote:


Your answer is totally unrelated to the question.

Am 27. Januar 2017 18:23:39 MEZ schrieb "Elizabeth A. Fischer" <
elizabeth.fisc...@columbia.edu>:

Get spack, then use it to build GCC 4.9.3  takes a couple hours of

wall

time, five minutes of your time.

Github.com/llnl/spack
On Jan 27, 2017 12:04 PM, "Michele Portolan" <
michele.porto...@grenoble-inp.fr> wrote:


I have a project that build correctly using gcc 4.9.3, generating

a

dynamic library that I can later link to obtain my executables.

So,

nothing

special.

My problem is that on one of my target systems, I only have a gcc

4.1.2

and I am forced to use it for at least  linking the last

executable.

My

project uses extensively C++14,so I cannot build it with the older

gcc.

Is there a way to have Cmake generate a library that is compatible

with

gcc 4.1.2?

Regards,


Michele
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community.

For

more

information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at

http://www.kitware.com/opensou

rce/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
gesendet.



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Comaptibility with older gcc

2017-01-27 Thread Michele Portolan
I have a project that build correctly using gcc 4.9.3, generating a 
dynamic library that I can later link to obtain my executables. So, 
nothing special.


My problem is that on one of my target systems, I only have a gcc 4.1.2 
and I am forced to use it for at least  linking the last executable. My 
project uses extensively C++14,so I cannot build it with the older gcc.


Is there a way to have Cmake generate a library that is compatible with 
gcc 4.1.2?


Regards,


Michele
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake