Page 1 of 1

[SOLVED]: sabyenc binary package for FREEBSD 11

Posted: June 9th, 2017, 5:03 pm
by jamaroney
I have a NAS4Free NAS running FreeBSD 11, and have upgraded sabnzbd to 2.0.1 from 1.0.3. However, sabyenc is not included, and N4F is not capable of compiling. Has anybody produced a binary package?

Re: sabyenc binary package for FREEBSD 11

Posted: June 9th, 2017, 6:22 pm
by safihre
Did you read the wiki on this? We link to this page and it has FreeBSD information. Does this not work for you?

https://sabnzbd.org/wiki/installation/s ... on-freebsd

Re: sabyenc binary package for FREEBSD 11

Posted: June 10th, 2017, 5:23 am
by jamaroney
This is what I get when I have pip install sabyenc:
Collecting sabyenc
Using cached sabyenc-3.0.2.tar.gz
Installing collected packages: sabyenc
Running setup.py install for sabyenc ... error
Complete output from command /usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/tmp/pip-build-0eaQXv/sabyenc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-YZkqQZ-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'sabyenc' extension
creating build
creating build/temp.freebsd-11.0-RELEASE-p10-amd64-2.7
creating build/temp.freebsd-11.0-RELEASE-p10-amd64-2.7/src
cc -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/local/include/python2.7 -c src/sabyenc.c -o build/temp.freebsd-11.0-RELEASE-p10-amd64-2.7/src/sabyenc.o -O2
unable to execute 'cc': No such file or directory
error: command 'cc' failed with exit status 1

----------------------------------------
Command "/usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/tmp/pip-build-0eaQXv/sabyenc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-YZkqQZ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/tmp/pip-build-0eaQXv/sabyenc/
I showed this on the N4F forums, and was told that an NAS generally doesn't have compiler programs such as "cc", and that my only recourse is to see if someone else made a binary package.

Re: sabyenc binary package for FREEBSD 11

Posted: June 10th, 2017, 6:46 am
by safihre
Yes, but did you run the other command? That's to install the compiler.

EDIT: sorry I was wrong, it's missing commands!

Re: sabyenc binary package for FREEBSD 11

Posted: June 10th, 2017, 4:54 pm
by sander
So this is your thread: https://nas4free.org/forums//viewtopic.php?f=4&t=12547 ?

The pip command uses the c compiler cc, which is available on a default install of FreeBSD, but not there on your minimum size NAS4free:

Code: Select all

unable to execute 'cc': No such file or directory
error: command 'cc' failed with exit status 1
First check: is _yenc installed as binary? Check with:

Code: Select all

python -c "import _yenc; print _yenc.__file__"
On my Ubuntu Linux:

Code: Select all

$ python -c "import _yenc; print _yenc.__file__"
/usr/lib/python2.7/dist-packages/_yenc.x86_64-linux-gnu.so

$ file /usr/lib/python2.7/dist-packages/_yenc.x86_64-linux-gnu.so
/usr/lib/python2.7/dist-packages/_yenc.x86_64-linux-gnu.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=235a74d64d77baa3c25ad218e8369b12db7eec86, stripped
If so, the NAS4Free does have a binary python module installed. That has been done by "someone". That someone should/could provide sabyenc in the same way.

If not: Are you able to install/run FreeBSD 11 in a virtual machine on your PC? If so, you can run the two-line command for sabyenc in that VM, and then (maybe) copy the files over to your NAS4Free. In other words: you can create those files yourself.
FWIW: I tried to do this myself, but have Virtualbox-problems on both my ubuntu systems ... >:(

Re: sabyenc binary package for FREEBSD 11

Posted: June 10th, 2017, 9:35 pm
by jamaroney
Yes, _yenc is installed, but it was installed via pkg (py27-yenc-0.3).

So, I tried "pkg install py27-sabyenc" and sure enough, the package existed and was installed. All is fine now.

It seems that the instructions for FreeBSD on https://sabnzbd.org/wiki/installation/sabyenc.html should be modified. py27-pip-9.0.1 is not needed, and all that is needed is "pkg install py27-sabyenc"

Re: sabyenc binary package for FREEBSD 11

Posted: June 11th, 2017, 1:39 am
by sander
Good to hear. So a pre-made sabyenc module is available for FreeBSD, and so now no need for pip & compiling, thus no problems with "cc". Good.

I've add your method to the wiki webpage.

Thanks.

EDIT:

Ah, it seems someone added it just two days ago:

Maintainer: tremere @ cainites . net
Port Added: 09 Jun 2017 18:48:06

See http://www.freshports.org/news/py-sabyenc/

Re: sabyenc binary package for FREEBSD 11

Posted: June 11th, 2017, 5:43 am
by jamaroney
sander wrote: Ah, it seems someone added it just two days ago:
Yes. In fact, in the N4F forum I had to direct a member to it, because it's available only under the "latest" section.