MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.52k stars 1.27k forks source link

g++ fails when installing on Arch Linux #1457

Closed MicroDroid closed 6 years ago

MicroDroid commented 6 years ago

I'm trying to create an Arch Linux package for mycroft since this one is obsolete. When installing the package I get something like:

  creating build/temp.linux-x86_64-2.7/fann2
  gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -DSWIG_COMPILE -I./include -I../include -Iinclude -I/usr/include/python2.7 -c fann2/fann2_wrap.cxx -o build/temp.linux-x86_64-2.7/fann2/fann2_wrap.o
  g++ -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-2.7/fann2/fann2_wrap.o -L/usr/lib -ldoublefann -lpython2.7 -o build/lib.linux-x86_64-2.7/fann2/_libfann.so
  /usr/bin/ld: cannot find -ldoublefann
  collect2: error: ld returned 1 exit status
  error: command 'g++' failed with exit status 1

  ----------------------------------------
  Failed building wheel for fann2
  Running setup.py clean for fann2
  Running setup.py bdist_wheel for olefile: started
  Running setup.py bdist_wheel for olefile: finished with status 'done'
  Stored in directory: /usr/share/mycroft-core/.cache/pip/wheels/75/f2/18/9f073aab5b308aaccec50c17d4afb33dffc3265254e7962d67
  Running setup.py bdist_wheel for httplib2: started
  Running setup.py bdist_wheel for httplib2: finished with status 'done'
  Stored in directory: /usr/share/mycroft-core/.cache/pip/wheels/ca/ac/5f/749651f7925b231103f5316cacca82a487810c22d30f011c0c
  Running setup.py bdist_wheel for xxhash: started
  Running setup.py bdist_wheel for xxhash: finished with status 'done'
  Stored in directory: /usr/share/mycroft-core/.cache/pip/wheels/99/02/66/22b257c04a4c131f2114f38b7d367e8f1e259af1b293b0c75d
  Running setup.py bdist_wheel for netifaces: started
  Running setup.py bdist_wheel for netifaces: finished with status 'done'
  Stored in directory: /usr/share/mycroft-core/.cache/pip/wheels/28/e1/08/e66a4f207479500a27eae682a4773fa00605f2c5d953257824
Successfully built gTTS gTTS-token backports.ssl-match-hostname PyAudio pyee tornado websocket-client adapt-parser future requests-futures pyyaml pyalsaaudio xmlrunner pyserial psutil pocketsphinx inflection python-vlc olefile httplib2 xxhash netifaces
Failed to build fann2
Installing collected packages: six, requests, gTTS-token, gTTS, backports.ssl-match-hostname, PyAudio, pyee, SpeechRecognition, certifi, tornado, websocket-client, adapt-parser, futures, future, requests-futures, parsedatetime, pyyaml, pyalsaaudio, xmlrunner, pyserial, psutil, pocketsphinx, inflection, olefile, pillow, python-dateutil, protobuf, netifaces, zeroconf, pychromecast, python-vlc, pulsectl, httplib2, pyasn1, pyasn1-modules, rsa, oauth2client, uritemplate, google-api-python-client, monotonic, pep8, fann2, xxhash, padatious
  Found existing installation: six 1.11.0
    Not uninstalling six at /usr/lib/python2.7/site-packages, outside environment /usr/share/mycroft-core/.virtualenvs/mycroft
  Found existing installation: websocket-client 0.46.0
    Not uninstalling websocket-client at /usr/lib/python2.7/site-packages, outside environment /usr/share/mycroft-core/.virtualenvs/mycroft
  Running setup.py install for fann2: started
    Running setup.py install for fann2: finished with status 'error'
    Complete output from command /usr/share/mycroft-core/.virtualenvs/mycroft/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IZ2apv/fann2/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-UXbym1-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/share/mycroft-core/.virtualenvs/mycroft/include/site/python2.7/fann2:
    running swig
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/fann2
    copying fann2/__init__.py -> build/lib.linux-x86_64-2.7/fann2
    copying fann2/libfann.py -> build/lib.linux-x86_64-2.7/fann2
    running egg_info
    writing fann2.egg-info/PKG-INFO
    writing top-level names to fann2.egg-info/top_level.txt
    writing dependency_links to fann2.egg-info/dependency_links.txt
    reading manifest file 'fann2.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'fann2.egg-info/SOURCES.txt'
    copying fann2/fann2.i -> build/lib.linux-x86_64-2.7/fann2
    copying fann2/fann2_wrap.cxx -> build/lib.linux-x86_64-2.7/fann2
    copying fann2/fann_cpp_subclass.h -> build/lib.linux-x86_64-2.7/fann2
    running build_ext
    building 'fann2._libfann' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/fann2
    gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -DSWIG_COMPILE -I./include -I../include -Iinclude -I/usr/include/python2.7 -c fann2/fann2_wrap.cxx -o build/temp.linux-x86_64-2.7/fann2/fann2_wrap.o
    g++ -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-2.7/fann2/fann2_wrap.o -L/usr/lib -ldoublefann -lpython2.7 -o build/lib.linux-x86_64-2.7/fann2/_libfann.so
    /usr/bin/ld: cannot find -ldoublefann
    collect2: error: ld returned 1 exit status
    error: command 'g++' failed with exit status 1

    ----------------------------------------
Command "/usr/share/mycroft-core/.virtualenvs/mycroft/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IZ2apv/fann2/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-UXbym1-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/share/mycroft-core/.virtualenvs/mycroft/include/site/python2.7/fann2" failed with error code 1 in /tmp/pip-build-IZ2apv/fann2/
*** ATTENTION ***

* The users who will use Mycroft need to be part of the mycroft-core group

* You can configure your Mycroft instance preferences systemwide at:
    /usr/share/mycroft-core/mycroft/configuration/mycroft.conf

* The systemd units are
    - mycroft.target
    - mycroft-service.service
    - mycroft-skills.service
    - mycroft-voice.service

* Those are USER units which you can start issuing:
    systemctl --user start mycroft.target
    More information at: https://wiki.archlinux.org/index.php/Systemd/User
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Trying to install the latest release of mycroft. I used such config to build the package.

el-tocino commented 6 years ago

I see:

/usr/bin/ld: cannot find -ldoublefann

which may be related to https://github.com/MycroftAI/mycroft-core/pull/1406 (and Issues 1361/1362/1383)

el-tocino commented 6 years ago

Also a new release was issued between when you posted this and now.

MicroDroid commented 6 years ago

Installing libfann for AUR did work.