Created attachment 193449 [details] amd64 build fixes for devel/RStudio r470021 Building devel/RStudio (1.1.451) on 11.1-STABLE r332554 amd64 fails with what appears to be integer/pointer and pointer type mismatches in assignments: [...] In file included from /home/tmu/ports/RStudio/work/rstudio-1.1.451/src/cpp/core/spelling/hunspell/affentry.cxx:9: /home/tmu/ports/RStudio/work/rstudio-1.1.451/src/cpp/core/spelling/hunspell/affentry.hxx:30:94: error: cannot initialize a parameter of type 'unsigned short' with an rvalue of type 'nullptr_t' struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL); ^ ~~~~ [...] /home/tmu/ports/RStudio/work/rstudio-1.1.451/src/cpp/core/system/Process.cpp:239:21: note: in instantiation of function template specialization 'boost::function<void (bool, bool)>::operator=<nullptr_t>' requested here cb.onHasSubprocs = NULL; [...] The attached patch allows me to successfully build RStudio on amd64.
RStudio (1.1.451) has built fine on 11.1-RELEASE-p6. What is the clang version on your system?
tmu:~$ clang -v FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0) Target: x86_64-unknown-freebsd11.1 Thread model: posix InstalledDir: /usr/bin
It is known to break with clang-6. On 12 it also breaks with boost-related errors that they've never fixed. About your patch, two things: 1. NULL should probably be replaced with nullptr. 2. It really belongs upstream. The right way is to create a pull request. Thanks for the patch! Yuri
The pull request: https://github.com/rstudio/rstudio/pull/2794
I couldn't make this patch work with clang5: In file included from /usr/local/include/boost/function/detail/maybe_include.hpp:29: /usr/local/include/boost/function/function_template.hpp:159:33: error: type 'std::__1::nullptr_t' does not provide a call operator BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); ^~~~ /usr/local/include/boost/function/function_template.hpp:81:36: note: expanded from macro 'BOOST_FUNCTION_RETURN' # define BOOST_FUNCTION_RETURN(X) X ^ /usr/local/include/boost/function/function_template.hpp:934:53: note: in instantiation of member function 'boost::detail::function::void_function_obj_invoker2<std::__1::nullptr_t, void, bool, bool>::invoke' requested here { { &manager_type::manage }, &invoker_type::invoke }; ^ /usr/local/include/boost/function/function_template.hpp:725:13: note: in instantiation of function template specialization 'boost::function2<void, bool, bool>::assign_to<std::__1::nullptr_t>' requested here this->assign_to(f); ^ It appears similar to how it currently breaks with clang6: https://github.com/rstudio/rstudio/issues/2373 Fix of the above issue #2373 should also resolve your problem. I don't think I can do anything more for this.
I only had my local system in view, thanks for the investigation.
This upstream commit is supposed to solve all clang issues, including this one: https://github.com/rstudio/rstudio/commit/ab3d4355ab5c7f4bc7af1f7aeabe62c3d1bbccec I will update the port shortly with this patch included. Please retest and let me know if the problem wouldn't go away.
A commit references this bug: Author: yuri Date: Fri May 18 03:48:28 UTC 2018 New revision: 470259 URL: https://svnweb.freebsd.org/changeset/ports/470259 Log: devel/RStudio: Fix clang6/boost build errors Add the upstream commit https://github.com/rstudio/rstudio/commit/ab3d4355ab5c7f4bc7af1f7aeabe62c3d1bbccec that is supposed to fix clang6/boost build errors. PR: 228289 Changes: head/devel/RStudio/Makefile head/devel/RStudio/distinfo
A commit references this bug: Author: yuri Date: Fri May 18 03:58:25 UTC 2018 New revision: 470261 URL: https://svnweb.freebsd.org/changeset/ports/470261 Log: devel/RStudio: Remove the bogus comment PR: 228289 Changes: head/devel/RStudio/Makefile
(In reply to Yuri Victorovich from comment #7) RStudio-1.1.453_1 built without errors on FreeBSD 11.1-STABLE r332554 using $ clang --version FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0) Target: x86_64-unknown-freebsd11.1 Thread model: posix InstalledDir: /usr/bin Thanks!
(In reply to Thomas Mueller from comment #10) Thanks for testing! Yuri