Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update SymEngine and fix build issues #43

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

Closed
wants to merge 7 commits into from

Conversation

certik
Copy link
Contributor

@certik certik commented Jan 29, 2016

This should hopefully work.

@certik certik mentioned this pull request Jan 29, 2016
1 task
@isuruf isuruf mentioned this pull request Feb 1, 2016
@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

Looks like Travis passes. Now we just need to convince Appveyor to find GMP.

@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

Ok, so now it fails with a legitimate error in MSVC:

"C:\projects\symengine-py-l1jmr\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.vcxproj" (default target) (3) ->
(ClCompile target) -> 
  C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.cpp(16370): error C2679: binary '=': no operator found which takes a right-hand operand of type 'SymEngine::RCP<const SymEngine::SeriesCoeffInterface>' (or there is no acceptable conversion) [C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.vcxproj]

and the same error in MinGW:

[ 50%] Building CXX object symengine/lib/CMakeFiles/symengine_wrapper.dir/symengine_wrapper.cpp.obj
C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.cpp: In function 'PyObject* __pyx_pf_9symengine_3lib_17symengine_wrapper_6series(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*)':
C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.cpp:16370:20: error: no match for 'operator=' (operand types are 'SymEngine::umap_short_basic {aka std::unordered_map<short int, Teuchos::RCP<const SymEngine::Basic> >}' and 'Teuchos::RCP<const SymEngine::SeriesCoeffInterface>')
         __pyx_t_16 = SymEngine::series(((SymEngine::RCP<SymEngine::Basic const >  &)__pyx_v__ex->thisptr), ((SymEngine::RCP<SymEngine::Symbol const >  &)__pyx_v_X), __pyx_v_N);
                    ^
C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.cpp:16370:20: note: candidates are:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\unordered_map:48:0,
                 from C:\projects\symengine-py-l1jmr\symengine\lib\symengine_wrapper.cpp:260:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\unordered_map.h:194:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) [with _Key = short int; _Tp = Teuchos::RCP<const SymEngine::Basic>; _Hash = std::hash<short int>; _Pred = std::equal_to<short int>; _Alloc = std::allocator<std::pair<const short int, Teuchos::RCP<const SymEngine::Basic> > >]
       operator=(const unordered_map&) = default;
       ^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\unordered_map.h:194:7: note:   no known conversion for argument 1 from 'Teuchos::RCP<const SymEngine::SeriesCoeffInterface>' to 'const std::unordered_map<short int, Teuchos::RCP<const SymEngine::Basic> >&'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\unordered_map.h:198:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&&) [with _Key = short int; _Tp = Teuchos::RCP<const SymEngine::Basic>; _Hash = std::hash<short int>; _Pred = std::equal_to<short int>; _Alloc = std::allocator<std::pair<const short int, Teuchos::RCP<const SymEngine::Basic> > >]
       operator=(unordered_map&&) = default;
       ^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\unordered_map.h:198:7: note:   no known conversion for argument 1 from 'Teuchos::RCP<const SymEngine::SeriesCoeffInterface>' to 'std::unordered_map<short int, Teuchos::RCP<const SymEngine::Basic> >&&'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\unordered_map.h:212:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(std::initializer_list<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type>) [with _Key = short int; _Tp = Teuchos::RCP<const SymEngine::Basic>; _Hash = std::hash<short int>; _Pred = std::equal_to<short int>; _Alloc = std::allocator<std::pair<const short int, Teuchos::RCP<const SymEngine::Basic> > >; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type = std::pair<const short int, Teuchos::RCP<const SymEngine::Basic> >]
       operator=(initializer_list<value_type> __l)
       ^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\unordered_map.h:212:7: note:   no known conversion for argument 1 from 'Teuchos::RCP<const SymEngine::SeriesCoeffInterface>' to 'std::initializer_list<std::pair<const short int, Teuchos::RCP<const SymEngine::Basic> > >'

It's weird that Travis passes.

@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

Ah ok, the Travis doesn't even test the Python wrappers....

This is a temporary workaround for the failure:

symengine/lib/symengine_wrapper.cpp:16370:20: error: no match for 'operator=' (operand types are 'SymEngine::umap_short_basic {aka std::unordered_map<short int, Teuchos::RCP<const SymEngine::Basic> >}' and 'Teuchos::RCP<const SymEngine::SeriesCoeffInterface>')
         __pyx_t_16 = SymEngine::series(((SymEngine::RCP<SymEngine::Basic const >  &)__pyx_v__ex->thisptr), ((SymEngine::RCP<SymEngine::Symbol const >  &)__pyx_v_X), __pyx_v_N);
                    ^

Once we fix it, we will enable it again.
@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

I pushed in a temporary workaround.

@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

Hopefully this will install it and test it on Travis. There are some test failures, which I will tackle once it installs.

@isuruf
Copy link
Member

isuruf commented Feb 1, 2016

@certik, you can use @rwst's patch in #44

@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

I will. I first want to make sure that all tests pass.

@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

I am testing @rwst's patch in #45.

@certik
Copy link
Contributor Author

certik commented Feb 1, 2016

Closing in favor of #45.

@certik certik closed this Feb 1, 2016
@certik certik deleted the update2 branch February 1, 2016 19:07
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

Successfully merging this pull request may close these issues.

2 participants