Skip to content

building pas

pkivolowitz edited this page Apr 14, 2017 · 6 revisions

This being Linux, building from source seems unavoidable. Sigh.

  1. Get git.

apt-get install git

  1. Close the repository.

git clone https://github.com/pkivolowitz/pas.git

  1. Get the mysql c++ connector.

apt-get install libmysqlcppconn-dev

  1. Get Google Protocol Buffers (proto3) located here:

https://github.com/google/protobuf/releases/tag/v3.0.0

Ubuntu comes with protoc2. You need protoc3.

One way to resolve this is by removing protoc2.

You'll need to download a cpp and an ARCH archive for proto3. When you get the missing this and that, recursively copy the src includes over to where you put the includes for proto.

This entirely sucks and is so typical of Linux.

  1. Get go.

apt-get install golang-go

  1. Set $GOPATH, typically ~/go.

cd mkdir go export GOPATH=~\go

  1. Get go helpers

go get -u github.com/golang/protobuf/protoc-gen-go

  1. Get libpulse-dev

apt-get install libpulse-dev

  1. Get libavcodev

apt-get install libavcodec-dev

  1. Get libavformat

apt-get install libavformat-dev

  1. Seriously reconsider why anyone would develop on Linux.

  2. Just try to find the right version of libprotodev. I dare you.

  3. Give up on installing proto3 manually - just compile it from source.

Follow directions here:

https://github.com/google/protobuf/blob/master/src/README.md

  1. Have dinner. It takes forever to build proto3 from source.

Wait. You can't leave your terminal. Have dinner at your terminal.

  1. Go out for drinks. It takes forever to build proto3 from source.

Wait. You can't leave your terminal. Have drinks at your terminal.

  1. Really seriously reconsider why anyone develops on Linux.

There are warnings thrown by the build. I deduct 10 percent of my student's grades for even one warning.

  1. Mate with an elephant. Wait for the result to gestate. Eighteen months, is it?

  2. Oh for fuck's sake.

  3. Sweet Jesus thank you. Rebuild pas proto commands with:

protoc -I=protos --cpp_out=protos/cpp --go_out=protos/go protos/commands.proto

  1. The pas server finally build. Try the command-line client.

  2. Edit server/db_component.cpp to set the IP address of your mysql server. This is needed only if you're not running the server on the same machine as the mysql server.

  3. Run

pacmd list-sinks

after attempting server.out. Attempting server.out first will cause the pulseaudio system to start enabling pacmd to work.

Note the alsa names. These are what the server will attempt to open. More later.

  1. Install ffmpeg.

apt-get install ffmpeg

Clone this wiki locally