[PPL-devel] Static linking and running on both windows and linux

anoninus wundermonk at gmail.com
Wed Mar 9 15:20:49 CET 2022


Hi Roberto,

Thank you for the detailed instructions. I have been able to slowly reach
the following step:

/home/roberto/ppl/configure --host=x86_64-w64-mingw32
--prefix=/home/roberto/pplinstall --with-cxxflags=-std=c++11
--with-gmp=/home/roberto/gmpinstall --enable-optimization
--disable-debugging --disable-documentation --enable-interfaces="c cxx"
--enable-ppl_lcdd --disable-ppl_lpsol --disable-ppl_pips
--enable-instantiations=Polyhedron --disable-shared --enable-static
--disable-assertions

but am stuck here. The reason for this is that the git repo that I cloned
does not have a file called configure.

That is, I went to my home directory and as suggested, I issued:

git clone git://git.bugseng.com/ppl/ppl.git

This creates a /ppl/ subfolder. However, this subfolder does not have a
file called configure. It has "BUGS", "ChangeLog",...,config.sub,
configure.ac, COPYING,...

skipping over the configure file

Hence, when I issue the equivalent of the command above on my machine, I
get:

bash: /home/Tryer/ppl/configure: No such file or directory

Could you please check whether the git branch above does indeed have the
configure file?

Thanks.
Tryer

On Wed, Mar 9, 2022 at 2:35 AM Roberto Bagnara <bagnara at cs.unipr.it> wrote:

> Hello Tryer.
>
> What I meant is that you could cross-compile the PPL under Linux for
> Windows.
> We do this routinely.
> I redid it just now, so as to be sure:
>
> $ mkdir gmpbuild gmpinstall pplbuild pplinstall
> $ cd /home/roberto/gmpbuild
> $ /home/roberto/gmp-6.2.1/configure --host=x86_64-w64-mingw32
> --prefix=/home/roberto/gmpinstall --enable-fat --enable-cxx
> --disable-shared --enable-static
> $ make
> $ make install
> $ cd /home/roberto/pplbuild
> $ /home/roberto/ppl/configure --host=x86_64-w64-mingw32
> --prefix=/home/roberto/pplinstall --with-cxxflags=-std=c++11
> --with-gmp=/home/roberto/gmpinstall --enable-optimization
> --disable-debugging --disable-documentation --enable-interfaces="c cxx"
> --enable-ppl_lcdd --disable-ppl_lpsol --disable-ppl_pips
> --enable-instantiations=Polyhedron --disable-shared --enable-static
> --disable-assertions
> $ make
> $ make install
> $ ls -R /home/roberto/pplinstall/
> /home/roberto/pplinstall/:
> bin  include  lib  share
>
> /home/roberto/pplinstall/bin:
> ppl-config.exe  ppl_lcdd.exe
>
> /home/roberto/pplinstall/include:
> ppl_c.h  ppl.hh
>
> /home/roberto/pplinstall/lib:
> libppl.a  libppl_c.a  libppl_c.la  libppl.la
>
> /home/roberto/pplinstall/share:
> aclocal  doc  man
>
> /home/roberto/pplinstall/share/aclocal:
> ppl_c.m4  ppl.m4
>
> /home/roberto/pplinstall/share/doc:
> ppl
>
> /home/roberto/pplinstall/share/doc/ppl:
> BUGS       COPYING  fdl.txt  NEWS    README.configure  TODO
> ChangeLog  CREDITS  gpl.txt  README  README.doc
>
> /home/roberto/pplinstall/share/man:
> man1  man3
>
> /home/roberto/pplinstall/share/man/man1:
> ppl-config.1  ppl_lcdd.1
>
> /home/roberto/pplinstall/share/man/man3:
> libppl.3  libppl_c.3
>
> Note:
>
> 0) If you are on a Debian-like Linux distro, you need to install
>     the g++-mingw-w64 package and possibly others.
> 1) I am enabling static libraries and disabling shared libraries
>     because of the subject of this thread (I usually do the opposite);
> 2) Your reference to Visual Studio 2019 confuses me: I do not think
>     there is binary compatibility between MSVC and MinGW.
>     I think you should compiler and link everything with MinGW.
>
> Again: do not use any bzip2 old distribution of PPL: use
> the Git version, devel branch.
> Kind regards,
>
>     Roberto
>
> On 08/03/22 20:28, anoninus wrote:
> > Hi Roberto,
> >
> > Thanks. Based on looking at the c++ code of ppl_lcdd, I have indeed been
> able to figure out the way to do the V to H convex hull computation.
> >
> > However, I have some difficulty understanding the following:
> >
> > On Tue, Mar 8, 2022 at 2:05 AM Roberto Bagnara <bagnara at cs.unipr.it
> <mailto:bagnara at cs.unipr.it>> wrote:
> >
> >     Regarding your other question, the PPL can be compiled for Windows
> using
> >     MinGW.
> >
> >
> > I have looked at the installation instructions at:
> >
> > https://www.bugseng.com/parma-polyhedra-library/ppl-portability <
> https://www.bugseng.com/parma-polyhedra-library/ppl-portability>
> > https://www.bugseng.com/ppl-requirements <
> https://www.bugseng.com/ppl-requirements>
> > https://www.bugseng.com/ppl-download <
> https://www.bugseng.com/ppl-download>
> >
> > I have installed MinGW on my Windows computer. Are you saying that I
> should *install* PPL using MinGW? On a linux machine, after downloading the
> bzip2 tar archive, I was indeed able to run ./configure, make and make
> install just fine. On a windows machine, I do not know how to *install* the
> library so that the system is able to "see" the ppl.hh file, for instance.
> In other words, what are the equivalent steps to take on the windows
> machine to ./configure, make and make install?
> >
> > Install and README.configure links on the ppl-download page do not seem
> to point at any specific page. They currently point to the same page.
> >
> > Or, is it that I should just store the contents of the folder obtained
> after extracting the zip file on
> > https://www.bugseng.com/ppl-download <
> https://www.bugseng.com/ppl-download> on any location of my choice on the
> windows machine.
> > Then, should I just inform my IDE on Windows (Visual Studio 2019) to
> find the header files in this folder? For e.g., the header file, ppl.hh is
> located in the src/ subfolder. Of course, then, as you suggest, I will
> change the settings in my IDE to use the MinGW toolchain instead of the
> MSVC toolchain.
> >
> > Thank you.
> > Tryer.
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20220309/9e767252/attachment.htm>


More information about the PPL-devel mailing list