Re: [Yade-dev] [IMPORANT] Migration to cmake
I successfully compiled yade (2012-07-04.git-cc040a1) with cmake. As Anton said cmake needs a new library (libxi-dev on debian squeeze). I edited the installation wiki [1] for debian. Please check if in ubuntu the needed library has the same name and update the wiki for ubuntu installation. [1] https://yade-dem.org/wiki/Installation_of_yade_on_debian_or_kubuntu When I try to run executable from bin or bins folder I get this message: Traceback (most recent call last): File "/home/me/YADE/YADEgit20120704-cmake/bins/yade-2012-07-04.git-cc040a1", line 22, in raise RuntimeError('Neither non-debug nor debug build found! ('+nonDebugLibDir+'/py/yade/__init__.py, '+debugLibDir+'/py/yade/__init__.py)') RuntimeError: Neither non-debug nor debug build found! (./lib/yade-2012-07-04.git-cc040a1/py/yade/__init__.py, ./lib/yade-2012-07-04.git-cc040a1/dbg/py/yade/__init__.py) What did I do wrong? BTW, do we have cmake experience from users of rpm-based systems? Zitat von Anton Gladky : Dear users and developers, if you looked after my last commits, you have probably payed attention on changes in cmake-build. Cmake is a cross-platform, open-source system widely used today for many open-source projects to handle build-process. I am going to replace scons build-system, which is used in yade last several years. The reason is to escape complicated and "hacked" style of SConstruct-files in the project, which is hard to maintain. CMake should prolong the life of yade without any changes from the "build-side". Also we will hopefully get better portability of the program on different platforms. I want to ask everybody to test precisely the new build-system before we drop scons-files. Cmake is working differently, other than scons. It builds its files not in the same folder, where is the source. So, you have to create a separate "build-place" for you. Like in scons, you should point the place, where the files will be installed. 1. Create a build place (a folder) 2. go into that folder 3. run in command line: cmake -DINSTALL_PREFIX=/path/to/installfolder /path/to/sources 4. Read, what is the written at the end of configure-process. You will see there, which yade-modules are enabled and disabled. If you want to enable/disable some modules, you should add to cmake command line the following variables: -DENABLE_GUI=ON(or OFF) -DENABLE_VTK=ON(or OFF) -DENABLE_OPENMP=ON(or OFF) -DENABLE_GTS=ON(or OFF) -DENABLE_GL2PS=ON(or OFF) All modules are ON by default. But if you do not have necessary packages in your system, some of them will be disabled by CMAKE. You will get a notice about that. Other parameters: -DDEBUG=ON (OFF by default) create debug-build -DSUFFIX=MYVERSION (by default - git revision) create suffix -DNOSUFFIX=ON (OFF by default) do not create suffix for yade (like yade-git-1234565) -DCMAKE_VERBOSE_MAKEFILE=ON (OFF by default) show an additional info during build 5. Type in command line make And wait, when the process is finished. Alternatively you can indicate how much cores, you want to use. For example: make -j4 Please, pay attention, yade requires approximately 2GB RAM/core. 6. Install: make install For GUI-option on Debian/Ubuntu-systems, please install 2 additional packages: sudo apt-get install libxmu-dev libxi-dev I have disabled chunkSize option for the moment. Yade has always problems with a huge consumption of RAM (especially on build-servers) during the compilation. I would like to ask everybody to test it and give a feedback. Cheers. Anton ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] [IMPORANT] Migration to cmake
2012/7/4 Christian Jakob : > I successfully compiled yade (2012-07-04.git-cc040a1) with cmake. As Anton > said cmake needs a new library (libxi-dev on debian squeeze). I edited the > installation wiki [1] for debian. Please check if in ubuntu the needed > library has the same name and update the wiki for ubuntu installation. > > [1] https://yade-dem.org/wiki/Installation_of_yade_on_debian_or_kubuntu Oh, we should probably remove that page from wiki. We have it in docs: https://yade-dem.org/doc/installation.html#prerequisities > > When I try to run executable from bin or bins folder I get this message: > > > Traceback (most recent call last): > File > "/home/me/YADE/YADEgit20120704-cmake/bins/yade-2012-07-04.git-cc040a1", line > 22, in > raise RuntimeError('Neither non-debug nor debug build found! > ('+nonDebugLibDir+'/py/yade/__init__.py, > '+debugLibDir+'/py/yade/__init__.py)') > RuntimeError: Neither non-debug nor debug build found! > (./lib/yade-2012-07-04.git-cc040a1/py/yade/__init__.py, > ./lib/yade-2012-07-04.git-cc040a1/dbg/py/yade/__init__.py) > > What did I do wrong? -DINSTALL_PREFIX should be an absoule path, not relative. Cheers, Anton ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] [IMPORANT] Migration to cmake
Hi Christian, I successfully compiled Yade using cmake on Red Hat Enterprise Linux Server release 6.2 (Santiago) after several days of trail and error ;-) However, I never had this problem. It seems the error is during runtime, right? Klaus On Wed, 4 Jul 2012 07:48:52 PM Christian Jakob wrote: > I successfully compiled yade (2012-07-04.git-cc040a1) with cmake. As > Anton said cmake needs a new library (libxi-dev on debian squeeze). I > edited the installation wiki [1] for debian. Please check if in ubuntu > the needed library has the same name and update the wiki for ubuntu > installation. > > [1] https://yade-dem.org/wiki/Installation_of_yade_on_debian_or_kubuntu > > When I try to run executable from bin or bins folder I get this message: > > Traceback (most recent call last): >File > "/home/me/YADE/YADEgit20120704-cmake/bins/yade-2012-07-04.git-cc040a1", > line 22, in > raise RuntimeError('Neither non-debug nor debug build found! > ('+nonDebugLibDir+'/py/yade/__init__.py, > '+debugLibDir+'/py/yade/__init__.py)') > RuntimeError: Neither non-debug nor debug build found! > (./lib/yade-2012-07-04.git-cc040a1/py/yade/__init__.py, > ./lib/yade-2012-07-04.git-cc040a1/dbg/py/yade/__init__.py) > > What did I do wrong? > > BTW, do we have cmake experience from users of rpm-based systems? > > Zitat von Anton Gladky : > > Dear users and developers, > > > > if you looked after my last commits, you have probably payed attention > > on changes in cmake-build. Cmake is a cross-platform, open-source system > > widely used today for many open-source projects to handle build-process. > > > > I am going to replace scons build-system, which is used in yade last > > several years. The reason is to escape complicated and "hacked" > > style of SConstruct-files in the project, which is hard to maintain. > > > > CMake should prolong the life of yade without any changes from the > > "build-side". > > Also we will hopefully get better portability of the program on > > different platforms. > > > > I want to ask everybody to test precisely the new build-system before we > > drop scons-files. > > > > Cmake is working differently, other than scons. It builds its files > > not in the same > > folder, where is the source. So, you have to create a separate > > "build-place" for you. Like in scons, you should point the place, where > > the files will be installed. > > > > 1. Create a build place (a folder) > > > > 2. go into that folder > > > > 3. run in command line: > > cmake -DINSTALL_PREFIX=/path/to/installfolder /path/to/sources > > > > 4. Read, what is the written at the end of configure-process. You will > > see there, > > > > which yade-modules are enabled and disabled. > > If you want to enable/disable some modules, you should add to > > > > cmake command > > > > line the following variables: > > -DENABLE_GUI=ON(or OFF) > > -DENABLE_VTK=ON(or OFF) > > -DENABLE_OPENMP=ON(or OFF) > > -DENABLE_GTS=ON(or OFF) > > -DENABLE_GL2PS=ON(or OFF) > > > > All modules are ON by default. But if you do not have necessary > > > > packages in your > > > > system, some of them will be disabled by CMAKE. You will get a > > > > notice about that. > > > > Other parameters: > > -DDEBUG=ON (OFF by default) create debug-build > > -DSUFFIX=MYVERSION (by default - git revision) create suffix > > -DNOSUFFIX=ON (OFF by default) do not create suffix for yade > > > > (like yade-git-1234565) > > > > -DCMAKE_VERBOSE_MAKEFILE=ON (OFF by default) show an additional > > > > info during build > > > > 5. Type in command line > > > > make > > > > And wait, when the process is finished. Alternatively you can > > > > indicate how much cores, > > > > you want to use. For example: > > make -j4 > > > > Please, pay attention, yade requires approximately 2GB RAM/core. > > > > 6. Install: > > make install > > > > For GUI-option on Debian/Ubuntu-systems, please install 2 additional > > packages: > > sudo apt-get install libxmu-dev libxi-dev > > > > I have disabled chunkSize option for the moment. Yade has always > > problems with a huge consumption > > of RAM (especially on build-servers) during the compilation. > > > > I would like to ask everybody to test it and give a feedback. > > > > Cheers. > > > > Anton > > > > ___ > > Mailing list: https://launchpad.net/~yade-dev > > Post to : yade-dev@lists.launchpad.net > > Unsubscribe : https://launchpad.net/~yade-dev > > More help : https://help.launchpad.net/ListHelp > > ___ > Mailing list: https://launchpad.net/~yade-dev > Post to : yade-dev@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-dev > More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-
Re: [Yade-dev] [IMPORANT] Migration to cmake
As Anton said, one has to use absolute paths, so the problem was here: #not working: me@debian ~/YADE/YADEgit20120704-cmake >cmake -DINSTALL_PREFIX=. /home/me/YADE/trunk #also not working: me@debian ~/YADE/YADEgit20120704-cmake >cmake -DINSTALL_PREFIX=/home/me/YADE/YADEgit20120704-cmake/ /home/me/YADE/trunk #this is correct: me@debian ~/YADE/YADEgit20120704-cmake >cmake -DINSTALL_PREFIX=/home/me/YADE/YADEgit20120704-cmake /home/me/YADE/trunk @anton: Thanks for the hint. @klaus: I know the problems, that occur while compiling yade on rpm-based systems. Libraries have different names and paths to libraries can be different. The first time I needed four days to compile it on Mandriva Linux... Zitat von Klaus Thoeni : Hi Christian, I successfully compiled Yade using cmake on Red Hat Enterprise Linux Server release 6.2 (Santiago) after several days of trail and error ;-) However, I never had this problem. It seems the error is during runtime, right? Klaus On Wed, 4 Jul 2012 07:48:52 PM Christian Jakob wrote: I successfully compiled yade (2012-07-04.git-cc040a1) with cmake. As Anton said cmake needs a new library (libxi-dev on debian squeeze). I edited the installation wiki [1] for debian. Please check if in ubuntu the needed library has the same name and update the wiki for ubuntu installation. [1] https://yade-dem.org/wiki/Installation_of_yade_on_debian_or_kubuntu When I try to run executable from bin or bins folder I get this message: Traceback (most recent call last): File "/home/me/YADE/YADEgit20120704-cmake/bins/yade-2012-07-04.git-cc040a1", line 22, in raise RuntimeError('Neither non-debug nor debug build found! ('+nonDebugLibDir+'/py/yade/__init__.py, '+debugLibDir+'/py/yade/__init__.py)') RuntimeError: Neither non-debug nor debug build found! (./lib/yade-2012-07-04.git-cc040a1/py/yade/__init__.py, ./lib/yade-2012-07-04.git-cc040a1/dbg/py/yade/__init__.py) ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] [IMPORANT] Migration to cmake
> @klaus: I know the problems, that occur while compiling yade on rpm-based > systems. Libraries have different names and paths to libraries can be > different. The first time I needed four days to compile it on Mandriva > Linux... Theoretically, cmake should care about that. Anton ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] [IMPORANT] Migration to cmake
Well, as you say, theoretically ;-) On Wed, 4 Jul 2012 09:03:15 PM Anton Gladky wrote: > > @klaus: I know the problems, that occur while compiling yade on rpm-based > > systems. Libraries have different names and paths to libraries can be > > different. The first time I needed four days to compile it on Mandriva > > Linux... > > Theoretically, cmake should care about that. > > > Anton > > ___ > Mailing list: https://launchpad.net/~yade-dev > Post to : yade-dev@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-dev > More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] [IMPORANT] Migration to cmake
>>> @klaus: I know the problems, that occur while compiling yade on rpm-based >>> systems. >> Theoretically, cmake should care about that. >> > Well, as you say, theoretically ;-) > Still easier than scons, no? Now, the ultimate test: who wants to try and cmake on Windows? Mac? :) Bruno ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp