SunnyXu / artificial_random_signaling_network

MIT License
0 stars 1 forks source link

Request for roadrunner_c_api dynamic library for Mac #1

Open djinnome opened 3 years ago

djinnome commented 3 years ago

Hi folks,

Steve Wiley asked me to review this paper, and I wanted to run the artificial random signaling network, but unless I have a PC, it doesn't seem to work.

Would you be willing to make an interface to libroadrunner that compiles on a Mac and/or Linux?

Also, I think aritificial_random_signaling_network has a spelling error. It should be renamed to artificial_random_signaling_network

Sincerely,

Jeremy

SunnyXu commented 3 years ago

@djinnome Hello, Thanks for correcting the title. I might generate the binary files for Mac and linux, but it would take sometime. When do you need it? Jin

SunnyXu commented 3 years ago

@djinnome I have just uploaded an old built binary file libroadrunner_c_api.dylib for Mac. In the file 'rr_funcs-Jin.jl', please change line #6 "rrlib = Libdl.dlopen("roadrunner_c_api.dll")" to "rrlib = Libdl.dlopen("libroadrunner_c_api.dylib")". Please let me know if it works.

srtaheri commented 3 years ago

after making the same change that you suggested Jeremy I'm still getting an error:

ERROR: LoadError: LoadError: could not load library "libroadrunner_c_api.dylib" dlopen(libroadrunner_c_api.dylib, 1): Library not loaded: @rpath/libroadrunner.1.6.0.dylib Referenced from: /Users/sarataheri/GitHub/artificial_random_signaling_network/libroadrunner_c_api.dylib Reason: image not found

Do you know how I can fix this issue?

djinnome commented 3 years ago

I get the same problem, even though I did this:

pip install --upgrade libroadrunner==1.6.0
include("Ground_truth_generation.jl")
ERROR: LoadError: LoadError: could not load library "libroadrunner_c_api.dylib"
dlopen(libroadrunner_c_api.dylib, 1): Library not loaded: @rpath/libroadrunner.1.6.0.dylib
  Referenced from: /Users/zuck016/Projects/Proposals/MARS/Pathogenesis/artificial_random_signaling_network/libroadrunner_c_api.dylib
  Reason: image not found
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
 [2] dlopen at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
 [3] top-level scope at /Users/zuck016/Projects/Proposals/MARS/Pathogenesis/artificial_random_signaling_network/rr_funcs-Jin.jl:6
 [4] include(::String) at ./client.jl:457
 [5] top-level scope at /Users/zuck016/Projects/Proposals/MARS/Pathogenesis/artificial_random_signaling_network/Ground_truth_generation.jl:5
 [6] include(::String) at ./client.jl:457
 [7] top-level scope at none:1
in expression starting at /Users/zuck016/Projects/Proposals/MARS/Pathogenesis/artificial_random_signaling_network/rr_funcs-Jin.jl:6
in expression starting at /Users/zuck016/Projects/Proposals/MARS/Pathogenesis/artificial_random_signaling_network/Ground_truth_generation.jl:5

Any suggestions? It just seems that RPATH doesn't know where to look to find libroadrunner.1.6.0.dylib

The actual location on my machine is:

/Users/zuck016/.pyenv/versions/anaconda3-2019.10/lib/python3.7/site-packages/roadrunner/libroadrunner.1.6.0.dylib
SunnyXu commented 3 years ago

@djinnome @srtaheri Hello, Thanks for your feedbacks. Pls allow me sometime to fix this. I will get back to you once figure it out. Jin

SunnyXu commented 3 years ago

@djinnome Have you tried to add the path to the sentence (rrlib = Libdl.dlopen("path\to\libroadrunner_c_api.dylib")? I might rebuild the dylib file or dig more for mac version once there is a chance.

djinnome commented 3 years ago

Hi @SunnyXu Yes, I did add the path to the sentence rrlib=Libdl.dlopen("libroadrunner_c_api.dylib") and if you notice, when I include "Ground_truth_generation.jl", julia recognizes libroadrunner_c_api.dylib. It just can't find libroadrunner.1.6.0.dylib even though I copied libroadrunner.1.6.0.dylib to the same directory as libroadrunner_c_api.dylib.

include("Ground_truth_generation.jl")
ERROR: LoadError: LoadError: could not load library "libroadrunner_c_api.dylib"
dlopen(libroadrunner_c_api.dylib, 1): Library not loaded: @rpath/libroadrunner.1.6.0.dylib
  Referenced from: /Users/zuck016/Projects/Proposals/MARS/Pathogenesis/artificial_random_signaling_network/libroadrunner_c_api.dylib
  Reason: image not found
Stacktrace:
SunnyXu commented 3 years ago

@djinnome Yes, I have noticed this. I even put libroadrunner.1.6.0.dylib into the same folder, but it didn't work. I might re-build the libroadrunner_c_api.dylib file sometime later and get back to you. If you are in a hurry, you could try to build roadrunner by yourself following the source (https://github.com/sys-bio/roadrunner/wiki/Building-from-Source). "pip install" will only generate python-based version, I am afraid.