Coder Social home page Coder Social logo

glpkerl's People

Contributors

pmineiro avatar

Watchers

James Cloos avatar

glpkerl's Issues

several building errors and warning; stuck with dialyzer: {dialyzer_error,"Byte code compiled with debug_info is needed to build the PLT"}

I am trying to compile the glpkerl library, but without success so far. 

Since I am getting errors all the way, maybe there is something crucial that I 
am missing:

My current procedure is as follows.

My installed Erlang version is R14B02 (installed via the official apt 
repository of my distro).

Since my glpk version is newer in the official repo, I downloaded glpk-4.38 
from here: http://ftp.gnu.org/gnu/glpk/. 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.

--------
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 && ./configure --prefix=$MY_PREFIX && make -s && make -s install
--------------


Next, I download the glpkerldrv and try to install it:

--
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
-----

Ok, apparently something went wrong while using make. On a closer look we can 
see that the c compiler treats warnings as errors, something that can be 
mitigated by using --disable-hardcore during configure, as stated on the 
glpkerl install wiki. But even then, the undeclared identifier error will not 
be mitigated with it.

--------
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
glpkerldrv.c: At top level:
--------

Ok, so let's correct it (I have no experience with C so I am unsure if this is 
the right way to do it): Apparently the perl script that generates handlers.c 
file should also include the limits.h.

--------------------------
--- a/src/make-handlers
+++ b/src/make-handlers
@@ -52,6 +52,10 @@
   my ($name, $values) = @_;

   print <<EOD;
+#include <limits.h>
+EOD
+
+  print <<EOD;
 #define deserialize_$name(buf, buflen)                          \\
   ({                                                            \\
     uint8_t byte;                                               \\
--------------------------

Now the building works (with --disable-hardcore, 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.


I am stuck in the second part though:

----
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
----

while building seems the work fine, the check fails because of a dialyzer 
error: 

----
dialyzer: Could not find the PLT: /home/my_user/.dialyzer_plt
----

Apparently, we can pass a DIALYZERFLAGS to the makefile, which I did:

----
DIALYZERFLAGS="--build_plt" PKG_CONFIG_PATH=$MY_PREFIX/lib/pkgconfig make -s 
check
----

Now the point were I am stuck:

----
dialyzer: {dialyzer_error,"Byte code compiled with debug_info is needed to 
build the PLT"}
----

the strange thing is, that the +debug_info parameter is passed to the erlang 
compiler apparently, as found in the Makefile.opt file.


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!

Original issue reported on code.google.com by [email protected] on 20 May 2012 at 2:11

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.