viennacl / pyviennacl-dev

Developer repository for PyViennaCL. Visit http://viennacl.sourceforge.net/ for latest releases.
MIT License
32 stars 6 forks source link

Compilation error on Mac OS 10.9.3 #21

Closed mrkite92 closed 10 years ago

mrkite92 commented 10 years ago

Hi Toby,

Here is the trace:

In file included from external/boost-python-ublas-subset/boost_subset/libs/thread/src/pthread/once.cpp:8:

In file included from external/boost-python-ublas-subset/boost_subset/libs/thread/src/pthread/./once_atomic.cpp:9:

In file included from external/boost-python-ublas-subset/boost_subset/boost/thread/once.hpp:20:

In file included from external/boost-python-ublas-subset/boost_subset/boost/thread/pthread/once_atomic.hpp:20:

In file included from external/boost-python-ublas-subset/boost_subset/boost/atomic.hpp:12:

In file included from external/boost-python-ublas-subset/boost_subset/boost/atomic/atomic.hpp:17:

In file included from external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/platform.hpp:22:

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:961:64: error: no matching constructor for initialization of 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)

                                                               ^  ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:968:22: error: no viable conversion from 'int' to 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

        storage_type tmp = 0;

                     ^     ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type &' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:983:22: error: no viable conversion from 'int' to 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

        storage_type tmp = 0;

                     ^     ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type &' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:997:22: error: no viable conversion from 'int' to 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

        storage_type expected_s = 0, desired_s = 0;

                     ^            ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type &' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:997:38: error: no viable conversion from 'int' to 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

        storage_type expected_s = 0, desired_s = 0;

                                     ^           ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type &' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:1013:22: error: no viable conversion from 'int' to 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

        storage_type expected_s = 0, desired_s = 0;

                     ^            ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type &' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:1013:38: error: no viable conversion from 'int' to 'storage_type' (aka 'pyviennaclboost::atomics::detail::storage128_type')

        storage_type expected_s = 0, desired_s = 0;

                                     ^           ~

external/boost-python-ublas-subset/boost_subset/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const pyviennaclboost::atomics::detail::storage128_type &' for 1st argument

struct BOOST_ALIGNMENT(16) storage128_type

                           ^

7 errors generated.

error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pyviennacl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-9TxWZV-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pyviennacl
Exception information:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pyviennacl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-9TxWZV-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pyviennacl
tsmithe commented 10 years ago

Cheers -- I'll take a look. Seems to be a clang thing.

tsmithe commented 10 years ago

Yeah, new versions of clang struggled with new versions of Boost. A relevant report is https://trac.macports.org/ticket/42282, and the fix will be in the next Boost release. I'll apply the fixes to my branch. Then could you try building from the git tree, rather than using pip?

tsmithe commented 10 years ago

Should be fixed in commit 7050536e. If you follow the instructions in README.rst for manually building from source, it should be fine. In essence, clone this repo and run:

$> git submodule update --init
$> python setup.py build
$> sudo python setup.py install

or something like it.

mrkite92 commented 10 years ago

Le 18 mai 2014 à 18:34, Toby Smithe notifications@github.com a écrit :

Yeah, new versions of clang struggled with new versions of Boost. A relevant report is https://trac.macports.org/ticket/42282, and the fix will be in the next Boost release. I'll apply the fixes to my branch. Then could you try building from the git tree, rather than using pip?

Full success! Thanks for this quick fix.

Cheers, JB

tsmithe commented 10 years ago

Great!