I have a problem with installing OpenGL (and GLut) and using it with Ocaml.
I have tried many different packages (under both Linux and Windows) and always got problems
about not found modules or other.
What will be easier : Linux or Windows? What should i exactly do? Which package of bindings is the best? ( are bindings is enough or i need to download some other things?)
Could anyone describe it step by step in a way that can be easy to follow?
Here are the exact steps :
sudo aptitude install liblablgl-ocaml-dev
cp /usr/share/doc/liblablgl-ocaml-dev/examples/simple.ml .
ocamlfind ocamlopt -linkpkg -package lablgl.togl simple.ml -o simple
./simple
I don't have the motivation to walk you through the installation process at the moment, but here are some (hopefully helpful) comments:
You generally want to use OCaml in *NIX because OCaml shows a very clear bias toward it. In particular, its debugger and profiler are not available in Windows.
One issue I randomly run into when installing new libraries in Linux (which may be a sign that I'm doing something dumb, come to think of it; oh, well) is permissions errors causing module loading errors. Try tracking down where the relevant libraries were installed and check that they're accessible (e.g. try lsing them as a user; seeing them in a directory is not enough).
For example, I recently installed OCamlMPI but was getting errors about it not being able to find modules even when I gave full paths to them.
It turned out that the directory it was stored in ($(ocamlc -where)/ocamlmpi) had a modmask of 0744 (i.e. drwxr--r--) when it should have had 0755 (i.e. drwxr-xr-x). After the permissions were changed, the modules loaded and worked just fine.
In fact, that's actually a problem I've run into when installing Python modules, too. Maybe I am doing something dumb somewhere.
Anyway, I hope that helps. :)
Related
I'm trying to compile the examples under cpp starting with minimal_build. I don't have much cmake experience. Must this be run under docker, or can it just be compiled in a Linux shell? I'm running Centos7 on a AWS EC2 instance, and I've installed cmake 3.20.2. Executing sudo ./run.sh, errors immediately with "cd: /io: No such file or directory". When I try and make what I think are the necessary changes to the scripts, I keep hitting errors. So I just want to see is this is even possible before proceeding further.
Thanks.
Yes, it is possible. I recently built Arrow on CentOS 7. With any C++ project there are going to be challenges switching amongst Linux distributions. The docker image is a way to provide a single example that the Arrow project can verify. You will need to adapt your Linux environment based on the issues you encounter. #Tsyvarev is also correct, you will want to use run_static.sh instead of run.sh. In order to do this you will need to dive a bit further into the details.
The build script has two steps. First, it will build the Arrow project itself. This is probably going to be the more challenging step. This guide is helpful for this step and provides a lot more detail into how Arrow builds and what options there are. The second step will be to compile and build the example.
Specifically for CentOS 7 one of the challenges you will face is that you will need a newer version of CMake. I ended up building CMake from source. If you go this route you also need to make sure that CMake is built with curl/https support. I used the --system-curl option for this.
That is all I remember having to do special for CentOS 7 at the moment. As you go about this task if you run into further, more specific, issues, feel free to ask them here or on the Arrow dev/user mailing list.
I am a new user of macintosh and uses OS X 10.9.4 Mavericks. I have recently installed Xcode and I have downloaded SDL2. This is where the problems started.
When I tried to compile some code that uses SDL2, I got a Xcode crash. The crash was expected behaviors since the reason was an invalid code signature in SDL2.
So I googled this and 2 solutions came up in this link. The first solution recommended that I downloaded the source code for SDL2 and recompiled it. The second solution was to update the code signature as
codesign -f -s - ~/Library/Frameworks/SDL2.framework/SDL2
The second solution seems to be the preferred one since the first solution probably does this in the end anyway. However, I am not completely familiar with code signatures since I come from a windows environment (where these things are hidden for the most) and also since all programming I have done have been for internal use only. So this is the long introduction and my questions are then:
Where is the code signature located (inside the frameworks or somewhere else in the computer)?
What can happen if I update the code signature? Especially can this cause any trouble in the future and even if SDL2.framework is uninstalled?
BR Patrik
You are not required to code sign a framework you build and install yourself (this is what I do for SDL 2). When Frameworks are codesigned the signature can be found in the "Versions" subdirectory of the Framework bundle. there will be the usual _CodeSignature directory for each signed "version", just as there is for an "app" bundle.
resigning the framework wont affect anything in your system. when you update the SDL2 framework to a version that doesnt have this problem your changes will be "undone".
Although I've just signed up for Stackoverflow, I've used answers.ros.org, pcl-users.org, and other similar sites. I'll try to give as much information as possible because although similar problems come up in Google searches I cannot find an answer to this.
I'm running Ubuntu 12.04 and I've installed PCL 1.7 via their set of instructions here: http:// pointclouds.org/downloads/linux.html
Following the tutorials I was able to get the "reader" and "writer" sample programs to work with the sample PCD's they give. I was also able to successfully use cmake to compile a more advanced program: http://pointclouds.org/documentation/tutorials/normal_distributions_transform.php#normal-distributions-transform
The problem begins whenever I try to make the iograbber or any other visualization programs that involve the Kinect. This is specifically the one I really want to use: http://pointclouds.org/documentation/tutorials/openni_grabber.php#openni-grabber Repeatedly, without fail, this has always been the warning I encounter when using cmake:
-- checking for module 'openni-dev'
-- package 'openni-dev' not found
-- Could NOT find openni (missing: OPENNI_INCLUDE_DIRS)
** WARNING ** io features related to openni will be disabled
It gives this warning several times in a row related to various components checking for it. Now you might say, "silly user, why don't you simply install openni-dev?"
Well when I initially did it with sudo apt-get install -y openni-dev (notice the -y which I soon learned about) it deleted most of my ROS/PCL files. Thread is here: http:// www.pcl-users.org/How-can-I-get-PCD-files-from-a-streaming-Kinect-td4033721.html It broke some packages and long story short I found out about aptitude and eventually I got myself back to square 1.
The thing is, I'm fairly sure I have openni 1.5.4 installed but somehow it isn't being found. When I go to my usr/lib folder it only shows an OpenNI2 folder, and not an OpenNI folder. I know there's a lot of issues with openni-dev popping up for PCL and ROS so I hope this answer will be able to help others as well. Before you ask, I'm copying/pasting the CMakeLists and C++ files exactly as I find it. I don't have a lot of programming experience so I hope I'm not missing something obvious.
If you use kinect v2, there's no OpenNI support.
So you can use this grabber:https://github.com/UnaNancyOwen/KinectGrabber/tree/Kinect2Grabber
My ultimate goal is to successfully link to a number of DLLs (opengl32.dll glfw.dll and glu32.dll) from a Go package -- but trying to link to the go-glfw package gave me "not defined" errors.
So I decided to get a very simple cgo dynamic/shared library linking to work, from the simple unmodified example in %GOROOT%\misc\cgo\life. But just invoking the command go build -o life main.go fails with essentially the same linker error, namely:
go-build374967034/_/C_/Go/misc/cgo/life.a(c-life.o)(.text): _assert: not defined
"not defined"... just exactly the same error I had when trying to link glfw as per above.
This is a fresh untampered-with install of Go 1.0.1 freshly downloaded this morning, on a vanilla, fairly recent Win7 64-bit installation. What could possibly go wrong? I know... Windows. Would love to hear any ideas... seems like DLL linking with CGO is a no-brainer and simple to do from what I read around the net. Yet even the simplest of examples fails for me.
I've think this particular bug has been discussed here: http://code.google.com/p/go/issues/detail?id=3261
but I'm not sure if it can be applied to your case. In the end from what I've read they proposed a patching but not really tried 'cause I'm waiting 1.1 release (hoping they'll fix the runtime infamous memory leak ;) )
http://code.google.com/r/hectorchu-go-windows/source/list
If you could compile it successfully, I like to know the procedures of how to.
Assuming you are using Hector's source tree:
Install MinGW and MSYS, along with MSYS Bison and any other tools you think you'll find useful (vim, etc).
Install ed from the GNUWin32 project.
Install Python and Mercurial.
Clone the [hectorchu-go-windows mercurial repository](https://hectorchu-go-windows.googlecode.com/hg/ hectorchu-go-windows) to C:\Go.
Run an MSYS shell (or rxvt). The rest of these are bash commands...
mkdir $HOME/bin
export PATH=$HOME/bin:$PATH
export GOROOT=C:\\Go
export GOARCH=386
export GOOS=mingw
cd /c/Go/src
./all.bash
Correct errors as it spits them out at you, repeat step 10 until it starts building.
It's the same idea as on Linux or MacOS, basically.
However, I still stand by what I said in my comment above: this isn't necessarily going to generate anything that actually works yet. You'd be better served by waiting until this effort has merged into the main Go tree before tackling it, unless your interest is in assisting with the porting effort.
Update: there is now a mostly-functional pre-built windows port available, for those not interested in building the compiler themselves. However, given the rate of change of the project, the lack of formal releases (other than the hg "release" tag), and the possibility of Hector's changes being merged into the main branch soon, keeping up with development via source builds is likely to produce better results over time.
Just FYI, there is seems official one now.
http://code.google.com/p/go-windows/
Hector said he was only able to get as far as being able to compile and run an empty main. See issue 107:
http://code.google.com/p/go/issues/detail?id=107
There is still a lot of work to do in porting that, especially since the code has lots of dependencies on ptrace and syscall, not to mention the different threading models between Linux/BSD and Windows.
Update:
There's a new thread on golang-nuts (started 26.03.2010) with a link to a recent build and some current building instructions (using MinGW+MSYS).