Compiling Errors - linux

I'm trying to compile a small game I made with SFML but whenever I do I get this error:
/usr/local/include/SFML/Window/OpenGL.hpp:48:24: fatal error: GL/glu.h: No such file or directory
Naturally, my first thought was I forgot to install opengl libraries, but when I yum install mesa-libGLU, I get this:
Package mesa-libGLU-7.11-0.11.20110525.0.fc15.x86_64 already installed and latest version
So I'm not sure what to do next.

Since it's a header you're missing, try installing the -devel version of that RPM.
mesa-libGLU-devel-7.11-0.11.20110525.0.fc15.x86_64

Related

Build mozilla JSS

I followed NSS build instructions and built NSS successfully.
Then I follow JSS build instructions and building fails with error:
In file included from CryptoManager.c:6:0:
../../../../dist/public/nss/secitem.h:15:21: fatal error: plarena.h: No such file or directory
compilation terminated.
This result is on Ubuntu 16.04 LTS.
On WIndows I get:
All directories (dist, jss, nspr and nss) are on the same level.
What am I doing wrong?
Check my post here. Basically it's due to missing packages. If not working, this file is somewhere under nspr. Copy it and place it beside the .c file which needs it.
EDIT:
To sum it up:
1. Install build-essential and gcc with g++.
2. Try to install zlib1g-dev and libc6-dev, if they are absent.
3. And, install zlib1g-dev.
4. cd into the nss directory, and run the build like this:
gmake nss_build_all NSS_SSL_ENABLE_ZLIB=
if you are under a x64 environment, add USE_64=1, too.
It should work.

Cannot cabal install hs3 (for haskell-supercollider)

(Ubuntu 12.04)
Hello!
I'm trying to get hs3 installed to my haskell platform so that I can use the haskore-supercollider package (it's a required dependency). However, when I attempt cabal install, it crashes on the some files I believe to be related to hosc. Here's a text readout of the error:
Sound/SC3/UGen/Help.hs:26:46: Not in scope: `lookupEnv'
cabal: Error: some packages failed to install:
hsc3-0.15 failed during the building phase. The exception was:
ExitFailure 1
I've attempted a number of things including updating cabal, reinstalling hosc, and throwing some flags on the install, or getting the install from a different source (slavepianos.org). Still though, I keep getting the same error. Here's an image of the error for reference:
http://i.stack.imgur.com/dGEKx.png
Thanks for your help!
You appear to have reached "Cabal Hell".
It looks to me like hsc3 for versions later than 0.13 depends on GHC being at least version 7.6 (the version which added the lookupEnv function), while Ubuntu 12.0.4 provides 7.4. This shows up as a compilation error because hsc3 has a badly set version bound on the base package.
You might try either of:
Installing a later version of GHC. It's currently at 7.8 with 7.10 expected out next month.
Using the older haskore-supercollider version 0.2, which uses hsc3 0.13. (Alas, when I try this with --dry-run, cabal fails to find an installation plan, but perhaps it works better if you actually have GHC 7.4.)

PkgConfig - package 'linux' not found

I wasnt't sure whether to put it on StackOverflow or AskUbuntu, but decided to post it here.
I have a problem building my app. I'm using CMake for building and one of the PkgConfig packages it depends on is linux. And when I'm trying to build it, it shows this error:
-- package 'linux' not found
When I'm removing the linux package from the dependencies, it complains about some Vala libraries isn't found. And the only way it is working is removing linux from the dependencies, then running cmake, then putting it to the dependencies again, then running make, then everything works fine (I don't know why).
I suppose I don't have some Ubuntu package installed and I don't have linux*.pc file, but I can't figure out what to do with it.
Can you help me with it?
UPD: Here is part of my CMakeFiles.txt file that raises the error:
find_package (PkgConfig)
message(STATUS "PKG_CONFIG_PATH: \"" ${PKG_CONFIG_PATH}\")
set (CORE_PKG
linux
gstreamer-1.0
gtk+-3.0
glib-2.0>=2.32
gio-2.0
json-glib-1.0
webkit2gtk-4.0>=2.6.1
libxml-2.0
gdk-x11-3.0
gstreamer-video-1.0
libnotify
libsoup-2.4
gee-0.8
)
pkg_check_modules (CORE_DEPS REQUIRED ${CORE_PKG})

Unable to install yesod-bin

I'm updating my yesod framework to the latest yesod 1.2 version. I've installed yesod-platform (painfully....had to manually delete old dependency....cabal hell), now I need to install yesod-bin and it should be done. However, after sudo cabal install yesod-bin I'm getting the following error.
Building yesod-bin-1.2.0...
Preprocessing executable 'yesod-ld-wrapper' for yesod-bin-1.2.0...
[1 of 1] Compiling Main ( ghcwrapper.hs, dist/build/yesod-ld-wrapper/yesod-ld-wrapper-tmp/Main.o )
Linking dist/build/yesod-ld-wrapper/yesod-ld-wrapper ...
/usr/bin/ld: cannot find -lHStar-0.4.0.1
/usr/bin/ld: cannot find -lHSoptparse-applicative-0.5.2.1
/usr/bin/ld: cannot find -lHSghc-paths-0.1.0.9
/usr/bin/ld: cannot find -lHSfsnotify-0.0.6
/usr/bin/ld: cannot find -lHShinotify-0.3.5
collect2: ld returned 1 exit status
Failed to install yesod-bin-1.2.0
cabal: Error: some packages failed to install:
yesod-bin-1.2.0 failed during the building phase. The exception was:
ExitFailure 1
According to this, I feel it may have something to do with privileges I'm not sure.
EDIT: So I only found the following two libraries.
/usr/lib/haskell-packages/ghc/lib/tar-0.3.2.0/ghc-7.4.1/libHStar-0.3.2.0.a
/usr/lib/haskell-packages/ghc/lib/ghc-paths-0.1.0.8/ghc-7.4.1/libHSghc-paths-0.1.0.8.a
I'm trying to update libghc-tar-dev to the newest version 0.4.0.1. However, 0.3.2.0 is the newest version on apt-get what are my options?
First, I'd check to see if you have the libraries libHStar, libHSoptparse-applicative, libHSghc-paths, libHSfsnotify and libHShinotify. If you installed the haskell platform using your distro's package manager, I suspect you'll find those libraries in /usr/local/lib/ghc-*.*.*/. For example, you might search for the first library using this command:
sudo find /usr/local/lib -name 'libHStar*'
If you don't have those libraries, then I think you can get them by using your distro's package manager to install the following:
libghc-tar-dev
libghc-optparse-applicative-dev
libghc-ghc-paths-dev
libghc-fsnotify-dev
libghc-hinotify-dev
If you already have those libraries, then you could adapt the fix suggested in your link:
sudo chmod a+r /usr/local/lib/ghc-*/libHS*
UPDATE:
The standard recommendation seems to be that you should always use your linux distro's package manager to install stuff, rather than using the cabal command directly. And if a package you want isn't available yet on your distro, request it. This approach is the safest, because all of the dependencies have been sorted out for you. The disadvantage is that you won't usually have the latest release. I see that there is a yesod package on Ubuntu. I have no idea if it contains yesod-bin (I'm not familiar with yesod), but if it does, that's the safest approach. The downside is that you will probably have to wipe out your cabal library and start from scratch (re-install haskell-platform, then yesod).
Another option, which seems to be the road you're on, is to use your package manager to install the haskell-platform, but after that use the cabal command to install any haskell-y stuff. You'll still use your package manager to install things that can't be installed using cabal (e.g., non-haskell stuff). If you do this, you can avoid a lot of cabal hell by never running cabal as root, and never letting your package manager do anything that can be done using cabal. The main disadvantage of this approach is that you have to deal with library dependencies yourself, as you've discovered. If you want to continue down this road, you might be able to get everything you need by switching to some development/test build for Ubuntu. Or you may have to get the correct versions of the libraries you need and manually install them.

Compiling vim with MinGW results in mingw-get install --reinstall binutils=2.22-1

I am trying to compile VIM with native support for ruby and am using MinGW for that.
The compilation goes as expected until the make file tries to execute windres -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 ..... vim.rc gobj/vimres.res
This step failes with a windres: unexpected version string length 68 != 32 + 8. I am at a complete loss what kind of error this is and how I am supposed to fix it.
As far as I can see I downloaded the newest version of both the vim sources and MinGW environment.
Searching the internet hinted me at trying to do a mingw-get install --reinstall binutils=2.22-1 which I did. But I still get the same error message.
It seems that the
mingw-get install --reinstall binutils=2.22-1
did not actually install a previous version.
Instead, with
mingw-get remove binutils
mingw-get install binutils=2.22-1
I was able to install the previous version. Now, the windres step works.
I just compiled Vim with MinGW/MSYS and among others dynamic ruby support. Check out this gist for a guide through the process with gvim74.exe installation file as output.

Resources