Closed ksil91 closed 5 years ago
The mention of Homebrew support on Linux through Linux Brew is really an afterthought. The recommended procedure for installing from source on non-Mac systems is found here. It's much easier to install either a local copy of the necessary libraries or use sudo
on Ubuntu if you have it. The last time I tried to use Linux brew it was also badly broken on my Ubuntu box. We're having enough trouble trying to support brew packages on Mac where they are prevalent. I don't want to speak out of line here without consulting Christine, but maintaining brew support on Linux seems to me like a headache we don't need right now.
Are you running into any specific problems with the from-source install? I can help you through that procedure if so.
Also, the fltkwithcairo
tap we setup on gtDMMB is custom tailored to compile with Mac-specific settings. This is why you are getting errors about sw_vers
not existing -- it doesn't, you're on a Linux. Like I mentioned before, it has been some combination of slow going and headaches to get what does work on a Mac with brew to slowly come around. Supporting a separate set of packages to use brew with Linux is not an optimal solution. You are using a developer's choice platform, so go make use of its nice features and stock compilers!
I did have errors on the Linux install from source too, during installation of FLTK:
$ make
=== making src ===
=== making cairo ===
Compiling Fl_Cairo.cxx...
Fl_Cairo.cxx:125:3: warning: #warning FIXME get W,H for cairo_make_current(void*) [-Wcpp]
'# warning FIXME get W,H for cairo_make_current(void*)'
^
/usr/bin/ar cr ../lib/libfltk_cairo.a ...
=== making fluid ===
Linking fluid...
../lib/libfltk_images.a(Fl_PNG_Image.o): In function `Fl_PNG_Image::load_png_(char const*, unsigned char const*, int)':
Fl_PNG_Image.cxx:(.text._ZN12Fl_PNG_Image9load_png_EPKcPKhi+0xf7): undefined reference to `png_set_longjmp_fn'
Fl_PNG_Image.cxx:(.text._ZN12Fl_PNG_Image9load_png_EPKcPKhi+0x30d): undefined reference to `png_set_longjmp_fn'
collect2: error: ld returned 1 exit status
Makefile:52: recipe for target 'fluid' failed
make[1]: *** [fluid] Error 1
Makefile:24: recipe for target 'all' failed
make: *** [all] Error 1
I tried googling the errors but haven't had any luck yet, so if you have advice I'd appreciate!
@ksil91 To me it looks like you are missing the PNG development libraries. Try searching for them and installing by running something like: $ apt-cache search libpng-dev $ sudo apt-get install libpng-dev If this doesn't fix it, I'm going to need to see the configure command you ran before make with all of the options. Pay specific attention to all of the packages that Anna and I had to install on a new Ubuntu before we could compile in this section. For example, do you also have libcairo and mesa installed?
I followed the installation instructions exactly as on the website, so used this configure:
./configure --enable-cairo --enable-threads
The configure worked, but the make
command did not.
And I have the newest libpng-dev:
libpng12-dev is already the newest version (1.2.54-1ubuntu1.1).
@ksil91 Ok, what the error message is telling you is that the code compiled (this is a good sign), but that it's not for some reason finding locally where the library files are stored on your system -- even though as you indicated they are there. Hence, the cited linker error. Would you try running this short process and tell me if it works (so I can update the install instructions):
$ ./configure --enable-cairo --enable-threads --with-x --enable-x11 CPPFLAGS=`pkg-config --cflags libpng` LDFLAGS=`pkg-config --libs libpng`
$ make
Also, if you prepend the messages here with @maxieds (or whichever user), I will see them quicker in my inbox.
@ksil91 I'm going to assume that the previous install modifications worked for you. I will close the issue on Monday if I haven't heard back.
@maxieds
Your command helped with the fltk install and that all seemed to work, however it was in the wrong order. It should be:
$ CPPFLAGS=
pkg-config --cflags libpngLDFLAGS=
pkg-config --libs libpng./configure --enable-cairo --enable-threads --with-x --enable-x11
Some errors I found going forward in the instructions for Debian-based installs from source:
>
is missing in front of actualSHA.diff
when checking the Vienna RNA download.RNAStructViz
from source is broken. I assume it takes you to the "Completing the from-source install" section under "Generic Linux from source", so I went ahead with those instructionsgit clone
address didn't work, so I used git clone https://github.com/gtDMMB/RNAStructViz.git
git checkout with-cairo
returned this error: error: pathspec 'with-cairo' did not match any file(s) known to git.
g++ `../scripts/pkg-config-flags.sh --cflags` `fltk-config --use-gl --use-images --use-glut --use-forms --use-cairo --cxxflags` -std=gnu++17 -DFLTK_HAVE_CAIRO -DFLTKSTATIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -funsigned-char -g -Wall -Wextra -pedantic -O0 -march=native -c BranchTypeIdentification.cpp
In file included from BranchTypeIdentification.h:17:0,
from BranchTypeIdentification.cpp:15:
RNAStructure.h:11:23: fatal error: Fl/Fl_Box.H: No such file or directory
compilation terminated.
Makefile:131: recipe for target 'BranchTypeIdentification.o' failed
make[1]: *** [BranchTypeIdentification.o] Error 1
make[1]: Leaving directory '/home/ksilliman/Downloads/RNAStructViz/src'
Makefile:2: recipe for target 'default' failed
make: *** [default] Error 2
It looks like maybe the Makefile is trying to use the fltk-build that is in /RNAStructViz/src/fltk-config
instead of the one I built myself?
@ksil91
Thank you for the notes on what was out of date with the install notes. Most of this has now been fixed. I believe what was missing from the instructions was that before running make
, you need to run:
$ export FLTK_INSTALL_DIR=/path/to/my/FLTK/install
Can you confirm that this fixes your compile errors? See this link.
@maxieds I figured out the problem, the src/RNAStructure.h
file has a typo. It should be a capital L, so:
#include <FL/Fl_Box.H>
not
#include <Fl/Fl_Box.H>
g++ -isystem /home/ksilliman/Downloads/fltk-1.3.4-2 `../scripts/pkg-config-flags.sh --cflags` `/home/ksilliman/Downloads/fltk-1.3.4-2/fltk-config --use-gl --use-images --use-glut --use-forms --use-cairo --cxxflags` -std=gnu++17 -DFLTK_HAVE_CAIRO -DFLTKSTATIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -funsigned-char -g -Wall -Wextra -pedantic -O0 -march=native -c BranchTypeIdentification.cpp
In file included from BranchTypeIdentification.h:19:0,
from BranchTypeIdentification.cpp:16:
RNAStructure.h:11:23: fatal error: Fl/Fl_Box.H: No such file or directory
compilation terminated.
Makefile:131: recipe for target 'BranchTypeIdentification.o' failed
make[1]: *** [BranchTypeIdentification.o] Error 1
make[1]: Leaving directory '/home/ksilliman/Downloads/RNAStructViz/src'
Makefile:2: recipe for target 'default' failed
make: *** [default] Error 2
@maxieds Ok it is up and running. In addition to fixing the FL error above, there was one more error I manually fixed.
Error:
CairoDrawingUtils.cpp: In static member function ‘static uint32_t CairoDraw::CairoContext_t::CairoColor_t::ColorUtil::RGBHexTupleFromFLColor(Fl_Color)’:
CairoDrawingUtils.cpp:359:6: error: ‘Fl’ has not been declared
Fl::get_color(flColor, R, G, B);
^
Fix: Add #include "FL/Fl.H"
to the top of src/CairoDrawingUtils.cpp
If you'd like I can pull the directory and push these changes (although I'm not certain I have access to do that).
I can handle the change. Thank you for the help with debugging. How are you liking StructViz so far?
On Thu, Apr 25, 2019, 1:03 PM Katherine Silliman notifications@github.com wrote:
@maxieds https://github.com/maxieds Ok it is up and running. In addition to fixing the FL error above, there was one more error I manually fixed.
Error:
CairoDrawingUtils.cpp: In static member function ‘static uint32_t CairoDraw::CairoContext_t::CairoColor_t::ColorUtil::RGBHexTupleFromFLColor(Fl_Color)’:
CairoDrawingUtils.cpp:359:6: error: ‘Fl’ has not been declared
Fl::get_color(flColor, R, G, B); ^
Fix: Add #include "FL/Fl.H" to the top of src/CairoDrawingUtils.cpp
If you'd like I can pull the directory and push these changes (although I'm not certain I have access to do that).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gtDMMB/RNAStructViz/issues/39#issuecomment-486778114, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJDROCAXAGJPIXGIFMCYOTPSHW7TANCNFSM4HG72MJA .
First, the installation instructions using Homebrew should change for Linux, as the current instructions did not work for me on Ubuntu 16.04. Homebrew recently moved away from Linuxbrew to officially supporting Linux with a regular homebrew installation. So Instead of installing linuxbrew with apt-get, users should follow these instructions for installing Homebrew. https://docs.brew.sh/Homebrew-on-Linux
Once I going homebrew working, I got an error when installing
gtDMMB/core/fltkwithcairo
:Installing gtdmmb/core/rnastructviz dependency: gtDMMB/core/fltkwithcai ==> Downloading https://www.fltk.org/pub/fltk/snapshots/fltk-1.4.x-20190329-7a3a ######################################################################## 100.0% Error: An exception occurred within a child process: Errno::ENOENT: No such file or directory - sw_vers
I tried installing fltk v1.4 from source but got errors there too.