[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] ELF Library
From: |
Robbie Morrison |
Subject: |
Re: [Help-glpk] ELF Library |
Date: |
Thu, 11 Apr 2013 08:10:47 +1200 |
User-agent: |
SquirrelMail/1.4.22 |
Hello again Gioker
A few more thoughts ..
------------------------------------------------------------
To: Robbie Morrison <address@hidden>
Subject: Re: [Help-glpk] ELF Library
Message-ID:
<address@hidden>
From: Giorgio Sartor <address@hidden>
Date: Wed, 10 Apr 2013 20:43:09 +0200
------------------------------------------------------------
[snip]
> However I successfully compiled the GLPK library
> in the server. Using "--prefix=PATH" with
> "configure" I was able to tell GLPK where to put
> my libraries.
>
> But my problem is not solved. In fact gcc still
> can't link. My 5 files are: main.c define.h
> cplex.c cplex.h glpk.h
>
> I use the command:
> gcc -L../glpk/lib -lglpk main.c cplex.c -o proximityglpk
I take it you built GLPK as a dynamic link library.
You may need to update the runtime linker cache
(but confirm the exact command before you use it,
particularly as you may not have superuser
privileges):
$ sudo ldconfig --verbose
Are you using a suitably structured makefile -- or
something equivalent:
http://en.wikipedia.org/wiki/List_of_build_automation_software
That certainly makes faultfinding easier.
> that gives me the linking error:
> /ext/256611.1.LOW/cc84zdWg.o: In function `getintparam':
> cplex.c:(.text+0x6b): undefined reference to `glp_assert_'
> cplex.c:(.text+0x92): undefined reference to `glp_assert_'
> /ext/256611.1.LOW/cc84zdWg.o: In function `getdblparam':
> cplex.c:(.text+0x11a): undefined reference to `glp_assert_'
> cplex.c:(.text+0x141): undefined reference to `glp_assert_'
> etc...
>
> Now I'm contacting the administrator of the system.
Good luck!
HTH, Robbie
> Gioker
>
> 2013/4/10 Robbie Morrison <address@hidden>
>
>>
>> Hello Gioker
>>
>> I am a little puzzled by your problem
>> description. But the following thoughts
>> may possibly help.
>>
>> ------------------------------------------------------------
>> To: "address@hidden" <address@hidden>
>> Subject: [Help-glpk] ELF Library
>> From: Giorgio Sartor <address@hidden>
>> Date: Wed, 10 Apr 2013 15:57:17 +0200
>> ------------------------------------------------------------
>>
>> > If I had been able to install glpk I would have
>> > done it and I would have create my own ELF
>> > library. Unfortunately the Linux system is a
>> > computing server in which I can't install
>> > anything. The kind of .o file that the server
>> > produces after compilation is :
>> >
>> > ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
>>
>> That is the standard Linux format, if I am not
>> mistaken. My Linux box reports, for a binary with
>> GLPK statically linked:
>>
>> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux),
>> statically linked, for GNU/Linux 2.6.15, not stripped
>>
>> And it reports '/usr/local/lib/libglpk.a' as:
>>
>> current ar archive
>>
>> > So I would like to have a glpk library made of
>> > this kind of Objects instead of the Mach-O ones.
>>
>> > Any solution?
>>
>> GNU gcc can apparently cross-compile to
>> Mach-o. See the manpage for 'gcc'.
>>
>> Can you not work on your server in user space?
>>
>> Else, talk to your sysadmin and get some
>> appropriate privileges to work on the server
>> as root. Or have them do the work.
>>
>> Just two other points. Some more details about
>> your systems and toolchains would help. And was
>> there a good reason to rename this thread, because
>> the earlier history is now orphaned?
>>
>> HTH, Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred) : address@hidden
[from Webmail client]