How to build zeromq4-haskell with local zmq? - haskell

I want to be able to build zeromq4-haskell or build a project that depends on zeromq4-haskell without ZeroMQ installed in my system.
In other words,I want a command stack build zeromq4-haskell to succeed and compile with my local version of ZeroMQ. I have already tried setting the LIBRARY_PATH and LD_LIBRARY_PATH to a directory, which is containing libzmq.so,but without any luck.
My goal is to build a project, depending on ZeroMQ, on a client's machine that might not have ZeroMQ installed or doesn't have rights to install it with a package manager.

Related

Distributing built version of gcc

I've built from source a version of GCC for Red Hat. Given that was a fairly expensive exercise, I'd like to "back up" the built version so I can avoid having to do it again on other machines or even if I scrap the VM it's currently built on.
What are my best options for doing that please?
This is what package managers are for. However, you have to build (usually) or deploy the package under the control of the package manager, because it is what keeps track of where the installed files are. You built it without using a package manager, and no longer have the complete build directory? Sorry, it's going to be quite tricky to find all the installed files.
However, if you still have the build directory and you haven't run make clean, you can just tar that up and copy that tar file somewhere, and run make install from an untarred copy of that tar file on each machine. Alternatively, you could use something like GNU Stow or XStow as a poor-man's package manager to deploy and undeploy it on various machines, by installing it to /usr/local/stow/gcc, tarring up the /usr/local/stow/gcc directory, untarring it on another machine, and then using GNU Stow to install it.

Clone compiled cmake build to identical hardware

I have successfully compiled opencv 3.1 on a raspberry pi. Developing with the library works perfectly fine. Now I wanted to set up another, identical raspberry with opencv and to save the compilation time, my idea was to copy the binaries to the second raspberry.
So I copied the opencv directories including the build folder and tried to run sudo make install. Instead of using the already compiled files, compilation using cmake starts over again.
How can I convince the second raspberry's build environent that there is no need to recompile everything? On my original raspberry, I can run sudo make install on the exactly same files without recompilation. Installed dev-libraries are the same on both systems. Is this a cmake, make or a opencv specific problem?
I also tried to copy all .so and .h files from /usr/... directories, but then I run into further problems when other cmake projects try to locate the opencv package.
Build directory is not intended to be copied into other place or on another machine.
For deliver program to other machine you should use installed files, or, more generally, a package.
CMake is shipped with CPack, which can build the program from sources and create package contained all its deliverables.
You may create .deb package on the first Raspberry PI machine:
cpack -G DEB <source-dir>
and install it on the second machine using dpkg.
There are also "archive" packages like .tgz or .zip. Full list of CPack generators is described in wiki.

Cocos2d-x linux release build (deploy) doesn't include libraries

I'm quite new to cocos2d-x, so this question may be a bit on the amateur side.
I built a release version of my game using cocos deploy -p linux -m release, found it in the bin folder of my cocos project. I compress it into a tarball, send it to my friend so he can try it in a clean Ubuntu VM. Here's what happened:
Is there a way to include shared libraries in the finished cocos executable or do I have to provide a bash script to install these libraries?

How do I install Brackets IDE from behind a firewall on Linux?

We are behind a firewall.
We have a self-hosted central npm repository, that doesn't have all the packages (most, but not all).
It seems the grunt build process (to compile from source) relies on phantomjs to be built via npm. I have phantomjs 1.9.2 built from source and available, but the process specifies that it needs to be installed via npm to work.
My goal is to build so I can use the IDE in my environment. There is a .app, and a .msi available for Wndows and Mac, but for Linux I have to compile from source (we have a .deb, but I'm on CentOS).
Any help is appreciated.
It looks like you don't actually need PhantomJS for building Brackets -- I see it's a dependency in the package.json, but I don't actually see a mention in the Brackets source code where it may be called.
So could you just try building Brackets without having PhantomJS installed and see if it works?

Where is linux-tick-processor on node.js ubuntu native package installation?

I have installed Node.js on an Ubuntu 64bit server using a standard apt-get and would like to profile scripts through the "--prof" flag.
Web searching shows there should be a tool to process the v8.log output located in "deps/v8/tools/linux-tick-processor" but I don't seem to have any of those directories. Do they come with the native install? should they be installed separately? if so how?
Thank you
You need to download the source package with sudo apt-get source nodejs.The path you mentioned is in there.
You'll need to scons prof=on d8 in deps/v8 to build the debugger first, which might have some trouble on a 64-bit machine (v8 is 32-bit only), see here for more info.
Here's how I did it for Node.js 0.10.25 and 0.10.26:
I downloaded the source for Node.js that corresponds to the binaries I'm using. (I'm on Debian testing, which is a bit behind the releases from the Node.js web site.)
I checked the version of v8 bundled in the node sources. (Look at deps/v8/ChangeLog. It was 3.14.5 for Node.js 0.10.25 and 0.10.26.)
I downloaded this exact version of v8 from the v8 site.
Why? I tried running make native in Node.js deps/v8 directory but the Makefile was complaining about a missing test directory. From this we can infer that the Node developers are not including the entire v8 distribution. Once upon a time, with an earlier version of Node (0.8.something) I did build v8 from what was available in deps/v8 but this time I decided to use a different approach.
As explained in v8's build/README.txt, in the top level of the source tree for v8, I did:
$ svn co http://gyp.googlecode.com/svn/trunk build/gyp
(Linking my installed gyp to build/gyp as suggested in OrangeDog's answer did not work. That's why I did the above.)
I ran:
$ CXX=g++-4.7 make native
Why the CXX setting? I ran into a compilation problem right away when I tried with the default gcc. I checked the version. It was 4.8 and I remembered a story on Slashdot about how 4.8 was giving people trouble. So I installed 4.7. Worked fine.
I linked out/native/d8 to a location which is in my PATH. This is because the linux-tick-processor script does a poor job at finding d8. The simplest solution was to make it available in my PATH. Your mileage may vary.
After all this, linux-tick-processor can be used with the v8.log files that Node produces.
Either install the source package - sudo apt-get source nodejs, or switch to the official source as the ubuntu packages are very out of date.
To build d8, go to the deps/v8 directory.
Create a symlink at build/gyp to the directory where gyp can be found (e.g. /usr/bin).
Run make native.
Copy/symlink out/native/d8 to somewhere on your PATH.

Resources