Discussion:
[Owfs-developers] issues building owfs from github source
Martin Patzak (GMX)
2016-12-08 14:34:15 UTC
Permalink
Hello all,

I am trying to build the latest owfs from github (and I thought this was
the easy part ;) - building it as a debian package for the ARM platform
will surely proofe to be harder still)

What I did so far:

/git clone git://git.code.sf.net/p/owfs/code owfs-code/
/
//cd owfs-code/

/.///bootstrap//
//... (output seems fine see attachment)/

/./configure/
/... (output seems fine see attachment)//
//
make/
/...//(for complete output see attachment)//

/... after a while this happens:

/Making all in php
make[3]: Entering directory '/home/mnm/git/owfs/owfs-code/module/swig/php'
CC ow_wrap.lo
ow_wrap.c:706:18: fatal error: zend.h: No such file or directory
#include "zend.h"
^
compilation terminated.
Makefile:590: recipe for target 'ow_wrap.lo' failed
make[3]: *** [ow_wrap.lo] Error 1
make[3]: Leaving directory '/home/mnm/git/owfs/owfs-code/module/swig/php'
Makefile:501: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/mnm/git/owfs/owfs-code/module/swig'
Makefile:511: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mnm/git/owfs/owfs-code/module'
Makefile:566: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
/

What could be the cause of this error?

Cheers Martin
Jan Kandziora
2016-12-08 14:43:45 UTC
Permalink
Post by Martin Patzak (GMX)
/Making all in php
make[3]: Entering directory '/home/mnm/git/owfs/owfs-code/module/swig/php'
CC ow_wrap.lo
ow_wrap.c:706:18: fatal error: zend.h: No such file or directory
#include "zend.h"
^
compilation terminated.
What could be the cause of this error?
You have *some* php development packages installed, that's why
./configure enabled the swig-php build. But it turns out it should test
for some other prerequisites.

As a quick fix, try

$ ./configure --disable-swig

Kind regards

Jan
Matthias Urlichs
2016-12-08 14:52:47 UTC
Permalink
Post by Jan Kandziora
As a quick fix
Does anybody even use SWIG any more (as opposed to talking to owserver)?
--
-- Matthias Urlichs
Martin Patzak (GMX)
2016-12-08 15:34:27 UTC
Permalink
Post by Jan Kandziora
As a quick fix, try
$ ./configure --disable-swig
that worked, thanks!

BUT: after it ran through without error, I do not find anything in /opt
there is no subdir /owfs? confused

I do not build very often, so I am sorry to have to ask those questions

Martin
Matthias Urlichs
2016-12-08 15:54:29 UTC
Permalink
Post by Martin Patzak (GMX)
Post by Jan Kandziora
As a quick fix, try
$ ./configure --disable-swig
that worked, thanks!
BUT: after it ran through without error, I do not find anything in /opt
there is no subdir /owfs? confused
Why /opt? the default for "make install" is /usr/local, unless you
configure a different prefix.
--
-- Matthias Urlichs
Stefano Miccoli
2016-12-08 16:46:21 UTC
Permalink
In owfs, as per co the default prefix is /opt /owfs

configure.ac:63:AC_PREFIX_DEFAULT(/opt/owfs)dnl

of cours you need a

$ make install

to have files in /opt/owfs.

(BTW: I hate the idea of "$ sudo make install”: one should always first set up the /opt/owfs and then issue “make install” from an unprivileged user.)

As what regards SWIG, in my opinion all the OWLIB language bindings should be disabled by default, in order to encourage the use of the OWNET clients.

If I can add a personal wish-list of changes to OWFS:

1) migrate the source on github
2) review configure.ac in order to disable most of the OWLIB language bindings
3) clean-up a lot of apparently dead code (e.g. src/rpm)

S.
Post by Matthias Urlichs
Post by Martin Patzak (GMX)
Post by Jan Kandziora
As a quick fix, try
$ ./configure --disable-swig
that worked, thanks!
BUT: after it ran through without error, I do not find anything in /opt
there is no subdir /owfs? confused
Why /opt? the default for "make install" is /usr/local, unless you
configure a different prefix.
--
-- Matthias Urlichs
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Owfs-developers mailing list
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Martin Patzak (GMX)
2016-12-08 17:53:57 UTC
Permalink
Post by Stefano Miccoli
In owfs, as per co the default prefix is /opt /owfs
configure.ac:63:AC_PREFIX_DEFAULT(*/opt/owfs*)dnl
yes, it is the the default
how do I change it? The Google-Kugel is not so helpful there...
Post by Stefano Miccoli
of cours you need a
$ make install
aha! Of course, install would be a good idea.
The last line in ./bootstrap is to do now do a .//configure/ and the a
/make/, so I was mislead, that this would be it!
Post by Stefano Miccoli
to have files in /opt/owfs.
(BTW: I hate the idea of "$ sudo make install”: one should always
first set up the /opt/owfs and then issue “make install” from an
unprivileged user.)
Thanks for pointing this out. The only reason for sudo here would be the
lack of write privileges to opt.
Another reason, why would want to install to my local /home directory...

Thank You!
Post by Stefano Miccoli
As what regards SWIG, in my opinion all the OWLIB language bindings
should be disabled by default, in order to encourage the use of the
OWNET clients.
1) migrate the source on github
2) review configure.ac in order to disable most of the OWLIB language bindings
3) clean-up a lot of apparently dead code (e.g. src/rpm)
S.
Post by Matthias Urlichs
Post by Martin Patzak (GMX)
Post by Jan Kandziora
As a quick fix, try
$ ./configure --disable-swig
that worked, thanks!
BUT: after it ran through without error, I do not find anything in /opt
there is no subdir /owfs? confused
Why /opt? the default for "make install" is /usr/local, unless you
configure a different prefix.
--
-- Matthias Urlichs
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Owfs-developers mailing list
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Owfs-developers mailing list
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Martin Patzak (GMX)
2016-12-08 17:59:13 UTC
Permalink
Post by Martin Patzak (GMX)
Post by Stefano Miccoli
In owfs, as per co the default prefix is /opt /owfs
configure.ac:63:AC_PREFIX_DEFAULT(*/opt/owfs*)dnl
yes, it is the the default
how do I change it? The Google-Kugel is not so helpful there...
do I edit the configure script?
Matthias Urlichs
2016-12-08 18:19:55 UTC
Permalink
I didn't even know that you can change the default prefix. Oh well.
Post by Martin Patzak (GMX)
how do I change it? The Google-Kugel is not so helpful there...
How about using the --prefix=… option?
--
-- Matthias Urlichs
Martin Patzak (GMX)
2016-12-08 19:13:08 UTC
Permalink
Post by Matthias Urlichs
I didn't even know that you can change the default prefix. Oh well.
Post by Martin Patzak (GMX)
how do I change it? The Google-Kugel is not so helpful there...
How about using the --prefix=… option?
Thank you will do so.
I just found different and confusing information to --prefix, so I was
not sure if it would be safe and sufficient to use it.
Tomasz Torcz
2016-12-08 17:59:35 UTC
Permalink
Post by Martin Patzak (GMX)
Post by Stefano Miccoli
In owfs, as per co the default prefix is /opt /owfs
configure.ac:63:AC_PREFIX_DEFAULT(*/opt/owfs*)dnl
yes, it is the the default
how do I change it? The Google-Kugel is not so helpful there...
Now need to google when you have answer at your fingertips.
./configure --help will tell you about PREFIX.
--
Tomasz Torcz There exists no separation between gods and men:
xmpp: ***@chrome.pl one blends softly casual into the other.
Martin Patzak (GMX)
2016-12-08 19:10:35 UTC
Permalink
Post by Tomasz Torcz
Post by Martin Patzak (GMX)
Post by Stefano Miccoli
In owfs, as per co the default prefix is /opt /owfs
configure.ac:63:AC_PREFIX_DEFAULT(*/opt/owfs*)dnl
yes, it is the the default
how do I change it? The Google-Kugel is not so helpful there...
Now need to google when you have answer at your fingertips.
./configure --help will tell you about PREFIX.
yes it does. Thank you!
Martin Patzak (GMX)
2016-12-09 11:53:04 UTC
Permalink
Post by Martin Patzak (GMX)
...
Post by Stefano Miccoli
to have files in /opt/owfs.
(BTW: I hate the idea of "$ sudo make install”: one should always
first set up the /opt/owfs and then issue “make install” from an
unprivileged user.)
Thanks for pointing this out. The only reason for sudo here would be
the lack of write privileges to opt.
Another reason, why would want to install to my local /home directory...
Of course it turned out to be a bit more complex than that:
I ran into the problem that the systemd services would be set up also in
a directory which my user has no write privileges.

Since I could not find how to disable the creation of the systemd
services, I managed to re-route them to a local directory by running
./configure with

/--with-systemdsystemunitdir=/some/other/local/dir/systemd

/The whole configure command turned out to look like

./configure --disable-swig --prefix=~/owfs/ --program-suffix=_test85C
--with-systemdsystemunitdir=~/owfs/systemd

that beeing said, I managed finally to install the binaries into my
local folder.

Martin Patzak (GMX)
2016-12-08 17:49:47 UTC
Permalink
Post by Matthias Urlichs
Post by Martin Patzak (GMX)
Post by Jan Kandziora
As a quick fix, try
$ ./configure --disable-swig
that worked, thanks!
BUT: after it ran through without error, I do not find anything in /opt
there is no subdir /owfs? confused
Why /opt? the default for "make install" is /usr/local, unless you
configure a different prefix.
This is the directory given by ./configure

I googled to change it, e.g. to a my home test directory, but it looks
like it is not so simple, so I left it to the default
Loading...