Installing/Running CGAL on Ubuntu - cmake

I can't seem to install CGAL properly on my computer. I'm using Ubuntu, and I ran these commands, like it says to do in the directions.
sudo apt-get install libcgal-dev
sudo apt-get install libcgal-demo
They install fine, no errors. But then the directions say to cd into CGAL-4.7, but couldn't find it. I found a CGAL under /usr/include, and it seems to include all the algorithm files. But there are no MakeFile/CMakeLists to cmake.
I'm not sure what to do?

Never mind, once I found it, I tried this below and it worked
cd /path/to/program
cgal_create_CMakeLists -s executable
cmake -DCGAL_DIR=$HOME/CGAL-4.7 .
make

Related

Adding Qt Dependencies to spec file in rpmbuild

I'm using Ubuntu 14.04 and I am updating the rpmbuild spec file of an application that now uses Qt.
The packages that I need are the following:
sudo apt-get build-essential
sudo apt-get install mesa-common-dev -y
sudo apt-get install libglu1-mesa-dev -y
sudo apt-get qt5-default
sudo apt-get qtwebengine5-dev
I know the spec file has "BuildRequires" and "Requires" dependency tags...any help in writing this as well as some examples would be helpful. I have a working spec file I just need to add the dependencies.
I think there is some confusion here. spec files are used to generate rpm files. However Ubuntu uses deb files.
Supposing you really want to create an rpm; then you need to know this:
BuildRequires
these packages are required for building the rpm. Typically you will need build-essential and the '*-dev` packages for building your application
Requires
these packages are required upon installation for your application to work; mostly you don't need your build-tools anymore, but you still need the qt5-default for example.
PS: on a little side note I might be one of the only people in the world building deb packages using spec files with a special conversion script https://bitbucket.org/klaussfreire/spec2deb/src/default/ but I wouldn't really recommend that.

Not able to install mod_perl module on the server

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance
It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod
Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

Building ssldump on Ubuntu

Has anyone built ssldump on Ubuntu lately? I am having trouble building http://downloads.sourceforge.net/project/ssldump/ssldump/0.9b3/ssldump-0.9b3.tar.gz - it appears to be referencing libraries that are too old for Ubuntu 12.04. I am trying this so that I can apply the TLS patch that is at http://sourceforge.net/p/ssldump/patches/8/.
If anyone has specific instructions to build ssldump, please share.
Assuming you have the necessary development libraries (personally, the easiest way for me is to "sudo apt-get install gnome-devel")
sudo apt-get install libpcap0.8-dev
sudo ln -sf /usr/include/pcap-bpf.h /usr/include/net/bpf.h
sudo apt-get install libssl-dev
Then cd into the ssldump source directory and: ./configure --host=i686-pc-linux-gnu --with-pcap-lib=/usr/lib/x86_64-linux-gnu/
make -j4
That should get you there. It worked for me on ubuntu 15.04. I may have missed out a few things though, cos I did it a couple of weeks ago, so if something doesn't work, leave a comment.

cmake not working, could not exec qmake

I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get:
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
What am I doing wrong?
Does the trick:
sudo apt-get install qt4-qmake
You do not need to install half a gigabyte of qt sdk!
I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.
However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):
sudo apt-get install qt-sdk
For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:
sudo apt install qt5-default
You need the qt dependences:
sudo apt-get install qt4-qmake libqt4-dev
as it says in docs: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu
sudo apt-get update
sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
works for me in Ubuntu 18.04
You can use QtCreator to compile the cmake project too. This is only advantageous over the accepted answer if you already have QtCreator installed, I notice you are using a qmake project so this might be likely.
The main advantage of this is that qt creator will be configured to use the qmake tool without the need to install the command line configured version of qmake.
Incidentally, I get this error if I try to run the qmake executable bundled with QtCreator on the command line.

Passenger/Apache missing gcc/zlib-devel on AWS/CENTOS

I am trying to install Passenger for Apache on an AWS instance running CENTOS. When I try to install it, it tells me:
GNU C++ compiler... not found
Zlib development headers... not found
These have both been installed (yum install gcc zlib-devel) and are at the latest version. gcc -v says that it's at 4.6.2.
I have seen similar questions where the accepted answer was to run
mount -o remount,rw,exec,nosuid /tmp
This returns the following:
mount: can't find /tmp in /etc/fstab or /etc/mtab
I have tried changing the permissions on the /tmp directory (it does exist, just doesn't appear to be mounted) with chmod 777 /tmp, but this did not allow the Passenger install to see the two packages.
Could someone please help me with this? I'm not sure what else to do at this point.
I couldn't solve the issue above, but I managed to install anyway by adding EPEL, then installing mod_passenger through yum:
rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install mod_passenger