I was wondering if anyone could give me an idea of how hard it is to build a CGI from source that requires two external libraries to build. All the code and libraries are open source. I'm not really familiar with building binary packages in Linux, but I'd like to run this CLI-type tool on a shared server. The tool is a bit complex. I've built it on my local machine, but I'll need to target a x86_64 architecture.

I think I can run CentOS 64 bit in a virtual box. After that is is just a matter of compartmentalizing all the libraries and source to run in the cgi-bin folder? Or is there a lot more to it?

ThanksEric

Last edited by Eric! on Mon Jan 21, 2013 3:14 pm, edited 1 time in total.

I understand the php/server part of it. I'm just not familiar with Linux enough to know what it will take to run the whole program on the server. It involves several libraries. If these are called dynamically or not I don't know.

My question is probably too generic to make a lot of sense but assume the worst case. I have to build the binary on a host's OS (via virtual box), that the supporting libraries need to be available locally and whatever else that I don't know about needs to be packaged up with it. I'm just trying to gauge the level of difficulty before I dive into it because I don't have a lot of time right now and I don't want to have to stop mid-way through the process.

Generally not that difficult. Most of the time the package will contain a configure script and makefile and, after making sure you've installed any library dependencies it may need (if you don't have one it'll tell you), run

Code:

./configure && make && make install

That's it. Most of the time.

To tell you much more kinda depends on knowing more about this program and the libraries it needs.

I'll probably just have to try to work through it. I can't use the default makefile because I want all the binaries/libraries under the cgi-bin structure. I've got to setup the CentOS environment and just see how far I can get with it. Thanks. I know it's a really vague question.

I'm not sure the best approach. Hopefully someone could give me some advice.

I could recompile, but I don't know the full path that will be used on the server.

I could try "patchelf" to modify the rpath of the binaries.

Since my host environment takes me a couple of hours just to get setup and configured for compiling I'd like to see if someone could recommend a solution to the shared library paths before I set aside another chunk of time to work on it. I found this reference helpful in explaining the methods, but I'm not sure what would be best.

It is weird that perl worked and the bin didn't, but I tried lots of things and that space was would break or fix it.

I don't have access to the server's library file system (shared host). I have them in cgi-bin but the bins aren't looking for them there. I could also just set the LD_LIBRARY_PATH with a script, because I need to wrap these tools with some HTML anyway. The side benefit would be preventing remote direct execution of the bins and allow me to make sure only the localhost can run the tools without having to modify the original source code.

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum