2021年8月17日火曜日 18:35:35 UTC+9 dim...@gmail.com:
> > > On Tue, 17 Aug 2021, 11:35 Isuru Fernando, <isu...@gmail.com> wrote: > >> Ah, you are using the system python that was built with gcc, but you want >> to build sage with clang/clang++. >> >> In python, setting CC will override the compiler used for building >> extension modules, but >> it will not override the linker used for building an extension module. >> >> What happens here is a file is compiled with `-fopenmp` with clang >> (meaning it needs to be linked with libomp from LLVM), >> but linked with `-fopenmp` with gcc (meaning it links to libgomp from >> GNU). >> >> To fix this, you'll have to set env variable LDSHARED="clang -pthread >> -shared" >> > > Thanks, great catch - perhaps we should have this in docs or wiki. > Then I did two builds. The first: $ CC=clang CXX=clang++ LDSHARED="clang -pthread -shared" ./configure && CC=clang CXX=clang++ LDSHARED="clang -pthread -shared" ./config.status --recheck && CC=clang CXX=clang++ LDSHARED="clang -pthread -shared" ./config.status && LDSHARED="clang -pthread -shared" make -> Error building Sage. The following package(s) may have failed to build (not necessarily during this run of 'make all-start'): * documentation: dochtml last build time: Aug 17 19:22 log file: /home/furutaka/work/sage/sage-9.4.rc2-git-clang3/logs/pkgs/../dochtml.log The second: $ CC=clang CXX=clang++ ./configure --with-system-python3=no && CC=clang CXX=clang++ ./config.status --recheck && CC=clang CXX=clang++ ./config.status && make -> build finished without errors. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/38001b0e-3fed-4c91-8796-24a9306f2ca7n%40googlegroups.com.