Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD build #390

Closed
palica opened this issue Nov 9, 2016 · 19 comments
Closed

FreeBSD build #390

palica opened this issue Nov 9, 2016 · 19 comments

Comments

@palica
Copy link

palica commented Nov 9, 2016

Hi I am having trouble compiling spreed-webrtc on FreeBSD 11

thus is what I am getting:

make
make: "/home/webrtc/spreed-webrtc-master/Makefile" line 591: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /home/webrtc/spreed-webrtc-master

Can you give me some guides as what to do about it?
Thank you

@palica
Copy link
Author

palica commented Nov 9, 2016

./autogen.sh
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force -I m4
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: configure.ac: not using Libtool
autoreconf-2.69: running: /usr/local/bin/autoconf-2.69 --force
autoreconf-2.69: configure.ac: not using Autoheader
autoreconf-2.69: running: automake --add-missing --copy --force-missing
Makefile.am:141: warning: release-binary was already defined in condition TRUE, which includes condition GO_14 ...
Makefile.am:139: ... 'release-binary' previously defined here
Makefile.am:143: warning: release-binary was already defined in condition TRUE, which includes condition !GO_14 ...
Makefile.am:139: ... 'release-binary' previously defined here
autoreconf-2.69: Leaving directory `.'

@fancycode
Copy link
Member

The Makefile is autogenerated when running configure, could you please provide some context on this line and a couple of lines before and after?

@palica
Copy link
Author

palica commented Nov 9, 2016

./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... (cached) nawk
checking for find... /usr/bin/find
checking for gpm... no
checking for jshint... no
checking for python2... no
checking for python... no
checking for go... /usr/local/bin/go
checking for version of Go... 1.7.1
checking third-party Go source code path... /home/webrtc/spreed-webrtc-master/vendor
checking for nodejs... no
checking for node... /usr/local/bin/node
checking for version of node.js... 6.9.1
checking for compass... no
configure: WARNING: Please install compass before trying to build styles.
checking for sass... no
configure: WARNING: Please install sass before trying to build styles.
checking for scss-lint... no
configure: WARNING: Please install scss-lint to lint styles.
checking for autoprefixer... no
configure: WARNING: Please install autoprefixer before trying to build styles.
checking for pybabel... no
configure: WARNING: Please install pybabel before trying to build i18n.
checking for npm... no
configure: WARNING: Please install npm and the the node.js module po2json to build i18n.
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/styles/Makefile
config.status: creating src/i18n/Makefile

@fancycode
Copy link
Member

Could you please also provide the Makefile contents? The line with the error and a couple of lines before and after should hopefully be enough.

@palica
Copy link
Author

palica commented Nov 9, 2016

I am going to install the missing dependencies through npm. Will be right back with Makefile content

@fancycode
Copy link
Member

All the missing dependencies reported with WARNING are optional and only required if you want to work on translations, styles, etc. Building the service itself should work without them.

@palica
Copy link
Author

palica commented Nov 9, 2016

.PHONY: all all-am am--refresh check check-am clean clean-generic \
        cscopelist-am ctags-am dist dist-all dist-bzip2 dist-gzip \
        dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
        distclean distclean-generic distcleancheck distdir \
        distuninstallcheck dvi dvi-am html html-am info info-am \
        install install-am install-data install-data-am install-dvi \
        install-dvi-am install-exec install-exec-am install-html \
        install-html-am install-info install-info-am install-man \
        install-pdf install-pdf-am install-ps install-ps-am \
        install-strip installcheck installcheck-am installdirs \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am

.PRECIOUS: Makefile


unexport GOBIN    <<<< Line 591

CONFIG_FILE ?= spreed-webrtc-server.conf
CONFIG_PATH ?= /etc
GOBUILDFLAGS ?=
GOTESTFLAGS ?=

BIN ?= /usr/local/sbin
SHARE ?= /usr/local/share/spreed-webrtc-server

@fancycode
Copy link
Member

@longsleep: this was added in 0b051e7

Is there another (more portable) way to unexport the variable?

@palica
Copy link
Author

palica commented Nov 9, 2016

I don't know, I tried also zsh and bash with the same result.

 make
make: "/root/spreed-webrtc-master/Makefile" line 591: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /root/spreed-webrtc-master
im:/root/spreed-webrtc-master@[15:33] # nano -w Makefile
im:/root/spreed-webrtc-master@[15:38] # zsh
im# make
make: "/root/spreed-webrtc-master/Makefile" line 591: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /root/spreed-webrtc-master
im# exit
im:/root/spreed-webrtc-master@[15:38] # bash
[root@im spreed-webrtc-master]# make
make: "/root/spreed-webrtc-master/Makefile" line 591: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /root/spreed-webrtc-master

@fancycode
Copy link
Member

Yes, it's evaluated by make which is the same no matter which shell you use. You should be able to remove the line as a workaround to make it compile for now.

@fancycode
Copy link
Member

Just found a similar report here: grehan-freebsd/grub2-bhyve#5

Their suggestion was to use gmake instead of make (which has a different syntax on FreeBSD).

@palica
Copy link
Author

palica commented Nov 9, 2016

OK will try

I found make man page
https://www.freebsd.org/cgi/man.cgi?make

didn't have time to read throught it.

will let you know

@palica
Copy link
Author

palica commented Nov 9, 2016

gmake
gmake get
gmake[1]: Entering directory '/root/spreed-webrtc-master'
if [ -z "" ]; then GOPATH="/root/spreed-webrtc-master/vendor:/root/spreed-webrtc-master" go get github.com/rogpeppe/godeps; fi
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/rogpeppe/godeps: exec: "git": executable file not found in $PATH
gmake[1]: *** [Makefile:612: goget] Error 1
gmake[1]: Leaving directory '/root/spreed-webrtc-master'
gmake: *** [Makefile:604: build] Error 2

@palica
Copy link
Author

palica commented Nov 9, 2016

my bad

installing git

@palica
Copy link
Author

palica commented Nov 9, 2016

It compiled

gmake
gmake get
gmake[1]: Entering directory '/root/spreed-webrtc-master'
if [ -z "" ]; then GOPATH="/root/spreed-webrtc-master/vendor:/root/spreed-webrtc-master" go get github.com/rogpeppe/godeps; fi
if [ -z "" ]; then GOPATH="/root/spreed-webrtc-master/vendor:/root/spreed-webrtc-master" /root/spreed-webrtc-master/vendor/bin/godeps -u dependencies.tsv; fi
update github.com/strukturag/sloth failed; trying to fetch newer version
github.com/strukturag/sloth now at 74a8bcf67368de59baafe5d3e17aee9875564cfc
update github.com/nats-io/nats failed; trying to fetch newer version
github.com/nats-io/nats now at 355b5b97e0842dc94f1106729aa88e33e06317ca
update github.com/dlintw/goconf failed; trying to fetch newer version
github.com/dlintw/goconf now at dcc070983490608a14480e3bf943bad464785df5
update github.com/gorilla/securecookie failed; trying to fetch newer version
github.com/gorilla/securecookie now at aeade84400a85c6875264ae51c7a56ecdcb61751
update github.com/strukturag/httputils failed; trying to fetch newer version
github.com/strukturag/httputils now at afbf05c71ac03ee7989c96d033a9571ba4ded468
update github.com/gorilla/websocket failed; trying to fetch newer version
github.com/gorilla/websocket now at a69d25be2fe2923a97c2af6849b2f52426f68fc0
update github.com/gorilla/mux failed; trying to fetch newer version
github.com/gorilla/mux now at ba336c9cfb43552c90de6cb2ceedd3271c747558
update github.com/longsleep/pkac failed; trying to fetch newer version
github.com/longsleep/pkac now at 68bf8859f58dd84332ee41c07eba357fb3818ba3
update github.com/satori/go.uuid failed; trying to fetch newer version
github.com/satori/go.uuid now at 879c5887cd475cd7864858769793b2ceb0d44feb
update github.com/strukturag/goacceptlanguageparser failed; trying to fetch newer version
github.com/strukturag/goacceptlanguageparser now at 68066e68c2940059aadc6e19661610cf428b6647
update github.com/strukturag/phoenix failed; trying to fetch newer version
github.com/strukturag/phoenix now at 31b7f25f4815e6e0b8e7c4010f6e9a71c4165b19
update github.com/gorilla/context failed; trying to fetch newer version
github.com/gorilla/context now at 215affda49addc4c8ef7e2534915df2c8c35c6cd
mkdir -p /root/spreed-webrtc-master/vendor/src/github.com/strukturag
rm -f /root/spreed-webrtc-master/vendor/src/github.com/strukturag/spreed-webrtc
ln -sfn /root/spreed-webrtc-master /root/spreed-webrtc-master/vendor/src/github.com/strukturag/spreed-webrtc
gmake[1]: Leaving directory '/root/spreed-webrtc-master'
gmake binary
gmake[1]: Entering directory '/root/spreed-webrtc-master'
GOPATH="/root/spreed-webrtc-master/vendor:/root/spreed-webrtc-master" /usr/local/bin/go build  -o bin/spreed-webrtc-server -ldflags '' app/spreed-webrtc-server
gmake[1]: Leaving directory '/root/spreed-webrtc-master'
gmake assets
gmake[1]: Entering directory '/root/spreed-webrtc-master'
./install-sh -c -d /root/spreed-webrtc-master/build/out
/usr/local/bin/node /root/spreed-webrtc-master/build/r.js \
        -o /root/spreed-webrtc-master/build/build.js \
        dir=/root/spreed-webrtc-master/build/out
./install-sh -c -d /root/spreed-webrtc-master/static/fonts
cp -r /root/spreed-webrtc-master/src/styles/libs/font-awesome/fonts/font* /root/spreed-webrtc-master/static/fonts
gmake[1]: Leaving directory '/root/spreed-webrtc-master'

but make install shows errors


gmake install                                                                                                                                                 
Installing binaries to: /usr/local/sbin
/usr/bin/install -c -d /usr/local/sbin
/usr/bin/install -c bin/spreed-webrtc-server /usr/local/sbin
Installing static resources to: /usr/local/share/spreed-webrtc-server
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/html
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/html/sandboxes
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/img
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/sounds
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/fonts
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/translation
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/css
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/js/libs/pdf
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/js/sandboxes
/usr/bin/install -c html/*.html /usr/local/share/spreed-webrtc-server/www/html
/usr/bin/install -c html/sandboxes/*.html /usr/local/share/spreed-webrtc-server/www/html/sandboxes
/usr/bin/install -c static/img/* /usr/local/share/spreed-webrtc-server/www/static/img
/usr/bin/install -c static/sounds/* /usr/local/share/spreed-webrtc-server/www/static/sounds
/usr/bin/install -c static/fonts/* /usr/local/share/spreed-webrtc-server/www/static/fonts
/usr/bin/install -c static/translation/* /usr/local/share/spreed-webrtc-server/www/static/translation
/usr/bin/install -c static/css/* /usr/local/share/spreed-webrtc-server/www/static/css
/usr/bin/install -c -D static/js/libs/require/require.js /usr/local/share/spreed-webrtc-server/www/static/js/libs/require/require.js
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
gmake: *** [Makefile:724: install-assets] Error 64

@palica
Copy link
Author

palica commented Nov 9, 2016

install-assets:
        @echo "Installing static resources to: $(DESTDIR)$(SHARE)"
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/html
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/html/sandboxes
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/img
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/sounds
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/fonts
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/translation
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/css
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/js/libs/pdf
        $(INSTALL) -d $(DESTDIR)$(SHARE)/www/static/js/sandboxes
        $(INSTALL) html/*.html $(DESTDIR)$(SHARE)/www/html
        $(INSTALL) html/sandboxes/*.html $(DESTDIR)$(SHARE)/www/html/sandboxes
        $(INSTALL) static/img/* $(DESTDIR)$(SHARE)/www/static/img
        $(INSTALL) static/sounds/* $(DESTDIR)$(SHARE)/www/static/sounds
        $(INSTALL) static/fonts/* $(DESTDIR)$(SHARE)/www/static/fonts
        $(INSTALL) static/translation/* $(DESTDIR)$(SHARE)/www/static/translation
        $(INSTALL) static/css/* $(DESTDIR)$(SHARE)/www/static/css
        $(INSTALL) -D static/js/libs/require/require.js $(DESTDIR)$(SHARE)/www/static/js/libs/require/require.js   >>>> Line 724
        $(INSTALL) $(OUTPUT_JS)/*.js $(DESTDIR)$(SHARE)/www/static/js
        $(INSTALL) $(OUTPUT_JS)/libs/pdf/*.js $(DESTDIR)$(SHARE)/www/static/js/libs/pdf
        $(INSTALL) -D static/js/libs/webodf.js $(DESTDIR)$(SHARE)/www/static/js/libs/webodf.js
        $(INSTALL) $(OUTPUT_JS)/sandboxes/*.js $(DESTDIR)$(SHARE)/www/static/js/sandboxes

install: install-binary install-assets

@palica
Copy link
Author

palica commented Nov 9, 2016

linux install
-D create all leading components of DEST except the last, then copy SOURCE to DEST

freebsd install

-D destdir
             Specify the DESTDIR (top of the file hierarchy) that the items
             are installed in to.  If -M metalog is in use, a leading string
             of ``destdir'' will be removed from the file names logged to the
             metalog.  This option does not affect where the actual files are
             installed.

@fancycode
Copy link
Member

Could you please try using the changes to Makefile.am from 3b6ddd9?

@palica
Copy link
Author

palica commented Nov 10, 2016

Works as expected thank you very much for your help and your guick answers.

gmake install
Installing binaries to: /usr/local/sbin
/usr/bin/install -c -d /usr/local/sbin
/usr/bin/install -c bin/spreed-webrtc-server /usr/local/sbin
Installing static resources to: /usr/local/share/spreed-webrtc-server
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/html
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/html/sandboxes
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/img
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/sounds
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/fonts
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/translation
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/css
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/js/libs/pdf
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/js/libs/require
/usr/bin/install -c -d /usr/local/share/spreed-webrtc-server/www/static/js/sandboxes
/usr/bin/install -c html/*.html /usr/local/share/spreed-webrtc-server/www/html
/usr/bin/install -c html/sandboxes/*.html /usr/local/share/spreed-webrtc-server/www/html/sandboxes
/usr/bin/install -c static/img/* /usr/local/share/spreed-webrtc-server/www/static/img
/usr/bin/install -c static/sounds/* /usr/local/share/spreed-webrtc-server/www/static/sounds
/usr/bin/install -c static/fonts/* /usr/local/share/spreed-webrtc-server/www/static/fonts
/usr/bin/install -c static/translation/* /usr/local/share/spreed-webrtc-server/www/static/translation
/usr/bin/install -c static/css/* /usr/local/share/spreed-webrtc-server/www/static/css
/usr/bin/install -c static/js/libs/require/require.js /usr/local/share/spreed-webrtc-server/www/static/js/libs/require
/usr/bin/install -c /root/spreed-webrtc-master/build/out/*.js /usr/local/share/spreed-webrtc-server/www/static/js
/usr/bin/install -c /root/spreed-webrtc-master/build/out/libs/pdf/*.js /usr/local/share/spreed-webrtc-server/www/static/js/libs/pdf
/usr/bin/install -c static/js/libs/webodf.js /usr/local/share/spreed-webrtc-server/www/static/js/libs
/usr/bin/install -c /root/spreed-webrtc-master/build/out/sandboxes/*.js /usr/local/share/spreed-webrtc-server/www/static/js/sandboxes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants