-
-
Save kolosek/0548b81355190c9c0f00 to your computer and use it in GitHub Desktop.
Installing libRETS on Ubuntu 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing librets in Ubuntu 14.04 can actually be fairly painless. Took me half an hour. | |
# I followed the instructions found at https://gist.github.com/sarkis/4472012 and made some modifications to keep it current. | |
cd ~/; mkdir src; cd src # or go to whatever folder you want to build source from | |
sudo apt-get update && sudo apt-get install build-essential | |
sudo apt-get install ruby-dev libexpat1-dev libcurl3-dev libboost-dev libboost-filesystem-dev antlr antlr3 libantlr-dev swig libboost-program-options-dev python-dev | |
# Swig preskociti | |
Download swig latest, unpack, read install file inside, and install | |
https://github.com/swig/swig/releases | |
$./autoconf.sh | |
./configure | |
make | |
sudo make install | |
# Download from source specific version(1.5.3) | |
https://github.com/NationalAssociationOfRealtors/libRETS/releases | |
cd into extracted downloaded sources (v. 1.5.3) | |
cd libRETS | |
change one part of the code in RetsExceptionContext.cpp on line 30 to: | |
RetsExceptionContext::RetsExceptionContext(const string & fileName, | |
int lineNumber) | |
{ | |
fs::path path(fileName); | |
#if BOOST_FILESYSTEM_VERSION < 3 | |
mFileName = path.filename(); | |
#else | |
mFileName = path.filename().string(); | |
#endif | |
mLineNumber = lineNumber; | |
} | |
and remove | |
#define BOOST_FILESYSTEM_VERSION 2 | |
#undef BOOST_FILESYSTEM_VERSION | |
#define BOOST_FILESYSTEM_VERSION 3 | |
./autogen | |
./configure CXXFLAGS=-fPIC CFLAGS=-fPIC CPPFLAGS=-fPIC --disable-java --disable-perl --disable-python --disable-php --enable-shared_dependencies --prefix=/usr/bin my_use_ruby=yes | |
make | |
sudo make install | |
irb | |
require 'librets_native' | |
# Afterward, if you want to get librets working for different ruby patchlevels you can just symlink librets_native.so: | |
cd ~/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/x86_64-linux | |
ln -s /home/martron/.rbenv/versions/1.8.7-p371/lib/ruby/site_ruby/1.8/x86_64-linux/librets_native.so ./ | |
# To test, just open irb: | |
require 'librets_native' | |
one of sources to solution https://groups.google.com/forum/#!msg/librets/XIwUWXI7QuU/bzhiJ8cuB0gJ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment