Note that there are some explanatory texts on larger screens.

plurals
  1. POglpkerl (glpk erlang library) compile error
    primarykey
    data
    text
    <p>I am trying to compile the glpkerl library on Ubuntu 11.10, but without success so far. </p> <p>Since I am getting errors all the way, maybe there is something crucial that I am missing:</p> <h2>What I tried</h2> <p>My installed Erlang version is R14B02 (installed via the official apt repository of my distro).</p> <p>Since my glpk version is newer in the official repo, I downloaded glpk-4.38 from here: <a href="http://ftp.gnu.org/gnu/glpk/" rel="nofollow">http://ftp.gnu.org/gnu/glpk/</a>. I don't want to install this version of glpk systemwide, so I create a directory, ~/opt, and use it in the following steps as the root for all libraries to be installed.</p> <pre class="lang-sh prettyprint-override"><code>export MY_PREFIX=$HOME/opt mkdir $MY_PREFIX cd /tmp curl http://ftp.gnu.org/gnu/glpk/glpk-4.38.tar.gz | tar zx cd glpk-3.48 &amp;&amp; ./configure --prefix=$MY_PREFIX &amp;&amp; make -s &amp;&amp; make -s install </code></pre> <p>Next, I download the glpkerldrv and try to install it:</p> <pre class="lang-sh prettyprint-override"><code>cd /tmp curl http://glpkerl.googlecode.com/files/glpkerldrv-4.38.0.tar.gz | tar xz cd glpkerldrv-4.38.0 ./configure --prefix=$MY_PREFIX LDFLAGS="-L$MY_PREFIX/lib" CPPFLAGS="-I$MY_PREFIX/include" make -s </code></pre> <p>Apparently something went wrong while using make. I disabled the transformation of compiler warnings to errors by using --disable-hardcore during configure, as stated on the glpkerl install wiki. But even then, the following undeclared identifier error still remains:</p> <pre class="lang-sh prettyprint-override"><code>handlers.c: In function decode_from: handlers.c:3310:29: error: INT_MAX undeclared (first use in this function) handlers.c:3310:29: note: each undeclared identifier is reported only once for each function it appears in </code></pre> <p>Apparently the perl script that generates handlers.c file should also include the limits.h. I corrected it by adding the following (I have no experience with C so I am unsure if this is the right way to do it):</p> <pre class="lang-diff prettyprint-override"><code>--- a/src/make-handlers +++ b/src/make-handlers @@ -52,6 +52,10 @@ my ($name, $values) = @_; print &lt;&lt;EOD; +#include &lt;limits.h&gt; +EOD + + print &lt;&lt;EOD; #define deserialize_$name(buf, buflen) \\ ({ \\ uint8_t byte; \\ </code></pre> <p>Now the building works (with <code>--disable-hardcore</code>, although I don't think the warnings are to be ignored, see attached file), and I can execute a make, make check, and make install, which I did.</p> <p>I am stuck in the second part though:</p> <pre class="lang-sh prettyprint-override"><code>cd /tmp curl http://glpkerl.googlecode.com/files/glpkerl-4.38.0.tar.gz | tar xz cd glpkerl-4.38.0/ ./configure --prefix=$MY_PREFIX LDFLAGS="-L$MY_PREFIX/lib" CPPFLAGS="-I$MY_PREFIX/include" PKG_CONFIG_PATH=$MY_PREFIX/lib/pkgconfig make -s PKG_CONFIG_PATH=$MY_PREFIX/lib/pkgconfig make -s check </code></pre> <p>while building seems the work fine, the check fails because of a dialyzer error: </p> <pre class="lang-sh prettyprint-override"><code>dialyzer: Could not find the PLT: /home/my_user/.dialyzer_plt </code></pre> <p>Apparently, we can pass a DIALYZERFLAGS to the makefile, which I did:</p> <pre class="lang-sh prettyprint-override"><code>DIALYZERFLAGS="--build_plt" PKG_CONFIG_PATH=$MY_PREFIX/lib/pkgconfig make -s check </code></pre> <h2>and here is where I am unsure how to proceed</h2> <p>after executing the last command, I get the following error:</p> <pre class="lang-sh prettyprint-override"><code>dialyzer: {dialyzer_error,"Byte code compiled with debug_info is needed to build the PLT"} </code></pre> <p>the strange thing is, that the +debug_info parameter is passed to the erlang compiler apparently, as found in the Makefile.opt file.</p> <p>I stopped investigating any further, because I am not sure how I can solve this at all with my current environment; am I missing something obvious here? Thanks!</p> <p>(tags: erlang glpk glpkerl)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload