--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/08763baa-fa57-4c4f-b190-86bec21b1231n%40googlegroups.com.
How exactly do you call ./configure?CC=clang CXX=clang++ ./configure <more options>produces a working build on some systems at least.In principle, gcc and clang are producing compatible binaries, but YMMV.Not so for g++ and clang++, mixing them up is likely to fail. There's also an extra complication involving clang's libc++ (its use depends upon your configuration)vs gcc's libstdc++
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/7-WLor8-71c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq0HOHqr5AVA_nd44sbN6QGr25bij1RfWYZAhkSsLjn-dQ%40mail.gmail.com.
2021年8月17日(火) 12:41 Dima Pasechnik <dim...@gmail.com>:How exactly do you call ./configure?CC=clang CXX=clang++ ./configure <more options>produces a working build on some systems at least.In principle, gcc and clang are producing compatible binaries, but YMMV.Not so for g++ and clang++, mixing them up is likely to fail. There's also an extra complication involving clang's libc++ (its use depends upon your configuration)vs gcc's libstdc++I did: `./configure CC=clang CXX=clang++`
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CANjERvegMthnw0fVCY6EAhbA5JJNepgLvpoGZ5re2cy06m7thQ%40mail.gmail.com.
On Tue, 17 Aug 2021, 06:50 Kazuyoshi Furutaka, <furutaka....@gmail.com> wrote:2021年8月17日(火) 12:41 Dima Pasechnik <dim...@gmail.com>:How exactly do you call ./configure?CC=clang CXX=clang++ ./configure <more options>produces a working build on some systems at least.In principle, gcc and clang are producing compatible binaries, but YMMV.Not so for g++ and clang++, mixing them up is likely to fail. There's also an extra complication involving clang's libc++ (its use depends upon your configuration)vs gcc's libstdc++I did: `./configure CC=clang CXX=clang++`please try the way I suggest, hopefully it will work better.
Did you rebuild python? You might have to do "make distclean".Isuru
4360 ## -------------------------------------------------------- ##
4361 ## Checking whether SageMath should install SPKG python3... ##
4362 ## -------------------------------------------------------- ##
4363 configure:33651: checking whether any of bzip2 xz libffi is installed as or will be installed as SPKG
4364 configure:33660: result: no
4365 configure:33664: checking for python3 >= 3.7.0, < 3.10.0 with modules sqlite3, ctypes, math, hashlib, crypt, socket, zlib, distutils.core
4366 configure:34331: result:
4367 configure:34355: checking ... whether /usr/bin/python3 is good
4368 CC=clang CXX=clang++ -std=gnu++11 conftest_venv/bin/python3 conftest.py --verbose build --build-base=conftest.dir
4369 running build
4370 running build_ext
4371 building 'config_check_distutils' extension
4372 creating conftest.dir
4373 creating conftest.dir/temp.linux-x86_64-3.9
4374 clang -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOU
4374 RCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O
4374 2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasyn
4374 chronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_
4374 FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC
4374 -fwrapv -Dlinux -I/usr/include -fPIC -I/home/furutaka/work/sage/sage-9.4.rc2-git-clang2/conftest_venv/include -I/usr/include/python3.9 -c conftest.c -o conftest.dir/temp.linux-
4374 x86_64-3.9/conftest.o
4375 creating conftest.dir/lib.linux-x86_64-3.9
4376 gcc -pthread -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Dlinux -I/usr/include conftest.dir/temp.linux-x86_64-3.9/conftest.o -
4376 L/usr/lib64 -o conftest.dir/lib.linux-x86_64-3.9/config_check_distutils.cpython-39-x86_64-linux-gnu.so
4377 CC=clang CXX=clang++ -std=gnu++11 conftest_venv/bin/python3 conftest.py --verbose build --build-base=conftest.dir
4378 running build
4379 running build_ext
4380 building 'config_check_distutils_cxx' extension
4381 creating conftest.dir
4382 creating conftest.dir/temp.linux-x86_64-3.9
4383 clang -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOU
4383 RCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O
4383 2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasyn
4383 chronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_
4383 FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC
4383 -fwrapv -Dlinux -I/usr/include -fPIC -I/home/furutaka/work/sage/sage-9.4.rc2-git-clang2/conftest_venv/include -I/usr/include/python3.9 -c conftest.cpp -o conftest.dir/temp.linu
4383 x-x86_64-3.9/conftest.o -std=c++11
4384 creating conftest.dir/lib.linux-x86_64-3.9
4385 clang++ -pthread -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Dlinux -I/usr/include conftest.dir/temp.linux-x86_64-3.9/conftest 4385 .o -L/usr/lib64 -o conftest.dir/lib.linux-x86_64-3.9/config_check_distutils_cxx.cpython-39-x86_64-linux-gnu.so
4386 configure:34909: result: yes
4387 configure:34911: checking for python3 >= 3.7.0, < 3.10.0 with modules sqlite3, ctypes, math, hashlib, crypt, socket, zlib, distutils.core
4388 configure:34977: result: /usr/bin/python3
4389 configure:34994: will use system package and not install SPKG python3
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CANjERveCGS%2Bcqv9yBpDXsAatUw7qBUt3WU4JSqbUEvG2_d%2Bt-A%40mail.gmail.com.
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, butit 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"
Did you rebuild python? You might have to do "make distclean".Isuru
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voNa5nPkB5LHe_%3DYdEnWWYWvjpx5NH5iE%3DvFvB8%3DE%2BWkaw%40mail.gmail.com.
Most probably, a system Python is used.We need the top-level config.log to know for sure.It used to work for me on Fedora 32 with system PythonOn Tue, 17 Aug 2021, 11:05 Isuru Fernando, <isu...@gmail.com> wrote:Did you rebuild python? You might have to do "make distclean".Isuru
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, butit 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"
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voMt4--cAM%2BUKSQaVz2GGPMb3w%3D_tfnY-pfdJ4AiNZmzQA%40mail.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, butit 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.