rocky / rb-lpsolve

Ruby bindings for lpsolve 5.5.10
GNU General Public License v2.0
3 stars 4 forks source link

Creating dynamic shared library (i.e. liblpsolve55.so) #2

Closed ns-1m closed 11 years ago

ns-1m commented 11 years ago

Hi,

I want to use your configure-enable lpsolve inorder to create dynamic library (i.e. liblpsolve55.so) together with your current static library (liblpsolve55.a).

Would be possible to show how to create liblpsolve55.so?

Thanks.

rocky commented 11 years ago

What happens when you try:

./configure --enable-shared
make liblpsolve55.so

from the untarred lpsolve-5.5.0.10i directory?

ns-1m commented 11 years ago

OK. Thanks.

However, I got error (below).

BTW, I am using Mac OS X. You configure enabled lpsolve works in Mac OS X.

What I wanted is *.dylib but I could rename liblpsolve55.so if it is working :-).

It is not working.

#########

Nolis-MacBook-Pro:lpsolve-5.5.0.10i2 nsicad$ make liblpsolve55.so Makefile:1255: warning: overriding commands for target dist' Makefile:1035: warning: ignoring old commands for targetdist' gcc -s -c -I. -I./shared -I./bfp -I./bfp/bfp_LUSOL -I./bfp/bfp_LUSOL/LUSOL -I./colamd -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine -g -O2 -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine lp_MDO.c ./shared/commonlib.c ./shared/mmio.c ./shared/myblas.c ./ini.c ./fortify.c ./colamd/colamd.c ./lp_crash.c ./bfp/bfp_LUSOL/lp_LUSOL.c ./bfp/bfp_LUSOL/LUSOL/lusol.c ./lp_Hash.c ./lp_lib.c ./lp_wlp.c ./lp_matrix.c ./lp_mipbb.c ./lp_MPS.c ./lp_params.c ./lp_presolve.c ./lp_price.c ./lp_pricePSE.c ./lp_report.c ./lp_rlp.c ./lp_scale.c ./lp_simplex.c ./lp_SOS.c ./lp_utils.c ./yacc_read.c gcc -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so echo lp_MDO.c ./shared/commonlib.c ./shared/mmio.c ./shared/myblas.c ./ini.c ./fortify.c ./colamd/colamd.c ./lp_crash.c ./bfp/bfp_LUSOL/lp_LUSOL.c ./bfp/bfp_LUSOL/LUSOL/lusol.c ./lp_Hash.c ./lp_lib.c ./lp_wlp.c ./lp_matrix.c ./lp_mipbb.c ./lp_MPS.c ./lp_params.c ./lp_presolve.c ./lp_price.c ./lp_pricePSE.c ./lp_report.c ./lp_rlp.c ./lp_scale.c ./lp_simplex.c ./lp_SOS.c ./lp_utils.c ./yacc_read.c |sed s/[.]c/.o/g|sed 's/[^ ]*\///g' ld: unknown option: -Bsymbolic collect2: error: ld returned 1 exit status make: *\ [liblpsolve55.so] Error 1

On 11/13/12, R. Bernstein notifications@github.com wrote:

What happens when you try:

./configure --enable-shared
make liblpsolve55.so

from the untarred lpsolve-5.5.0.10i directory?


Reply to this email directly or view it on GitHub: https://github.com/rocky/rb-lpsolve/issues/2#issuecomment-10311594

rocky commented 11 years ago

I don't own a OSX or have access to one. So unless you want to buy me Mac, you are on your own.

In a sense this really has nothing to do with the Ruby library or gem. What you want to know is how to build lpsolve 5.5.0.12 with shared libraries. Admittedly I've made a couple of additions to the stock lpsolve 5.5.0.12, so you shouldn't hit them up with questions about my modified code.

But if you knew how to build whatever you want from the stock 5.5.0.12, it would be clear how to do it here as well. My additions to lpsolve 5.5.0.12 are totally portable and have nothing to do with OS-specific code.

If you do figure it out, feel free to add this information to the wiki or send back patches. Thanks.

ns-1m commented 11 years ago

In a sense this really has nothing to do with the Ruby library or gem. What you want to know is how to build lpsolve 5.5.0.12 with shared libraries. Admittedly I've made a couple of additions to the stock lpsolve 5.5.0.12, so you shouldn't hit them up with questions about my modified code.

But if you knew how to build whatever you want from the stock 5.5.0.12, it would be clear how to do it hear as well. My additions to lpsolve 5.5.0.12 are totally portable and have nothing to do with OS-specific code.

If you do figure it out, feel free to add this information to the wiki or send back patches. Thanks.

Reading your answer again above, where can I get your lpsolve stock 5.5.0.12 which has configure enabled?

Where could I download it?

Yes, I am helping create NO PAIN install for LPSolve for Mac OS X as I did GLPK/MathProg i.e. helped Andrew created installation for Linux and Mac OS X.

Thanks again.

rocky commented 11 years ago

https://github.com/rocky/rb-lpsolve/blob/master/README

ns-1m commented 11 years ago

OK.

That's what I am have been using.

Most of the time, most of the linux stuff work in my modified Mac OS X

My 5 years old questions on how to compile LPSolve XLI dynamic libraries for Windows and Linux has not been addressed. So, I am trying to address this question myself :-).

Thanks.

Noli

On 11/13/12, R. Bernstein notifications@github.com wrote:

https://github.com/rocky/rb-lpsolve/blob/master/README


Reply to this email directly or view it on GitHub: https://github.com/rocky/rb-lpsolve/issues/2#issuecomment-10313859