Barrier: Build instructions for linux needed

Created on 9 Apr 2018  路  10Comments  路  Source: debauchee/barrier

Build instructions for linux are needed. Plain cmake + make does not work. Make fails on
/home/tavasti/Downloads/barrier-2.0.0/src/./lib/common/common.h:27:3: error: #error "config.h missing"
# error "config.h missing"

Most helpful comment

Just walked through it on a new Linux Mint 18.3 Sylvia installation:

# Clone Repo
git clone https://github.com/debauchee/barrier.git
cd barrier

Now, you need to edit the CMakeLists.txt file and add /usr/include to the CMAKE_INCLUDE_PATH, seems to be known, but didn't work for me until I added it.

set (CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/include")
set (XKBlib "X11/Xlib.h;X11/XKBlib.h") # This line is already here; add the previous line just above this.

Now, more bash commands:

# Install Dependencies
sudo apt -y install cmake gcc build-essential libx11-dev libavahi-compat-libdnssd-dev libxtst-dev qtbase5-dev libssl-dev

# Build Barrier
./clean_build.sh

# Run Barrier
./build/bin/barrier

Tried running ./build/bin/barrierc so I could just pass it all the parameters to connect to my barrier server, but it seemed to crash my terminal and not do anything else. So, for now I've added ./build/bin/barrier to my Startup Applications and I'll just have to type in the server IP each time I reboot. Not the end of the world, since I've been suffering a lot more since Synergy 2 released.

All 10 comments

I believe I saw you getting help with this on IRC, @tavasti ... did everything work out?

And, yes, documentation is lacking at this point.

Yes, I got things rolling. Point was run clean_build.sh and if you are not on git version, in cmake/Version.cmake adding line like:
set (BARRIER_REVISION 12345678)

You might be able to do cmake -DBARRIER_REVISION 123123123 .....etc

Just walked through it on a new Linux Mint 18.3 Sylvia installation:

# Clone Repo
git clone https://github.com/debauchee/barrier.git
cd barrier

Now, you need to edit the CMakeLists.txt file and add /usr/include to the CMAKE_INCLUDE_PATH, seems to be known, but didn't work for me until I added it.

set (CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/include")
set (XKBlib "X11/Xlib.h;X11/XKBlib.h") # This line is already here; add the previous line just above this.

Now, more bash commands:

# Install Dependencies
sudo apt -y install cmake gcc build-essential libx11-dev libavahi-compat-libdnssd-dev libxtst-dev qtbase5-dev libssl-dev

# Build Barrier
./clean_build.sh

# Run Barrier
./build/bin/barrier

Tried running ./build/bin/barrierc so I could just pass it all the parameters to connect to my barrier server, but it seemed to crash my terminal and not do anything else. So, for now I've added ./build/bin/barrier to my Startup Applications and I'll just have to type in the server IP each time I reboot. Not the end of the world, since I've been suffering a lot more since Synergy 2 released.

Thx @VertigoRay , for me on ubuntu 18.04, it was also necessary to install libcurl4-nss-dev (and there is a typo for libavahi-compat-libdnssd-dev)

Thanks everyone for this project

I'm glad it helped. 馃槉 Fixed the typo.

I happen to have an answer (that I've since verified does successfully build barrier) for issue #41 where I tossed the following reply for the build process on linux:

sudo apt update && sudo apt upgrade
sudo apt install git cmake make xorg-dev g++ libcurl4-openssl-dev \
                 libavahi-compat-libdnssd-dev libssl-dev libx11-dev \
                 libqt4-dev qtbase5-dev
git clone [email protected]:debauchee/barrier.git
cd barrier
./clean_build.sh
cd build
sudo make install  # installs to /usr/local/ 

I'll recommend we add these (or better) instructions to the wiki at: https://github.com/debauchee/barrier/wiki/Building-on-Linux

For release-versions (tar or zip) instructions need bit more fidling, and those should be also covered.

Install Dependencies

sudo apt -y install cmake gcc build-essential libx11-dev libavahi-compat-libdnssd-dev libxtst-dev qtbase5-dev libssl-dev

Build Barrier

./clean_build.sh

Run Barrier

./build/bin/barrier
```

Many thanks!
Successful build on Debian stretch after installing libcurl3-nss separately followed by libcurl4-nss-dev; already had libcurl3 and libcurl3-gnutls installed.

Was going a bit batty trying to figure this out. Thanks again!

Can confirm @dayne 's instructions worked for me on ubuntu 18

Was this page helpful?
0 / 5 - 0 ratings

Related issues

graingert picture graingert  路  4Comments

wjtk4444 picture wjtk4444  路  4Comments

PlatinumDragon picture PlatinumDragon  路  5Comments

HereInPlainSight picture HereInPlainSight  路  4Comments

shymega picture shymega  路  4Comments