clang-8: error: unknown argument: '-flto-partition=none' when building lxml

classic Classic list List threaded Threaded
4 messages Options
slacka slacka
Reply | Threaded
Open this post in threaded view
|

clang-8: error: unknown argument: '-flto-partition=none' when building lxml

When I build with clang/linux I'm now seeing the following error:

Building lxml version 4.1.1.
Building without Cython.
Using build configuration of libxslt 1.1.32
Building against libxml2/libxslt in the following directory: /usr/lib
...
clang -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -DCYTHON_CLINE_IN_TRACEBACK=1 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.7m -c src/lxml/etree.c -o build/temp.linux-x86_64-3.7/src/lxml/etree.o -w
clang-8: error: unknown argument: '-flto-partition=none'
Compile failed: command 'clang' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit8q3851b_.c -o tmp/xmlXPathInit8q3851b_.o
/tmp/xmlXPathInit8q3851b_.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main (int argc, char **argv) {
 ^~~~
cc tmp/xmlXPathInit8q3851b_.o -L/usr/lib -lxml2 -o a.out
error: command 'clang' failed with exit status 1
make[1]: *** [/core/external/lxml/ExternalProject_lxml.mk:25: /core/workdir/ExternalProject/lxml/build] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:286: build] Error 2

I could be wrong, but I believe this error showed up when I updated my core OS. (Arch) I tried and older version of clang and an older version of the LibreOffice that used to compile and I'm now seeing this error there too.




_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: clang-8: error: unknown argument: '-flto-partition=none' when building lxml

On 24/08/18 20:02, Luke Benes wrote:

> When I build with clang/linux I'm now seeing the following error:
>
> Building lxml version 4.1.1.
> Building without Cython.
> Using build configuration of libxslt 1.1.32
> Building against libxml2/libxslt in the following directory: /usr/lib
> ...
> clang -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall
> -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt
> -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none
> -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt
> -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt
> -fPIC -DCYTHON_CLINE_IN_TRACEBACK=1 -I/usr/include/libxml2 -Isrc
> -Isrc/lxml/includes -I/usr/include/python3.7m -c src/lxml/etree.c -o
> build/temp.linux-x86_64-3.7/src/lxml/etree.o -w
> clang-8: error: unknown argument: '-flto-partition=none'

external/lxml/ExternalProject_lxml.mk is somewhat special in that it (by
accident?) uses $$CFLAGS (i.e., whathever the CFLAGS env var is set to
in the shell run by `make`) instead of $(CFLAGS) (i.e., what configure
determined and potentially stored in config_host.mk; the value typically
used in other external/*/ExternalProject_*.mk).  Maybe that is the
source of your "-flto -fuse-linker-plugin -ffat-lto-objects
-flto-partition=none" arguments?
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
slacka slacka
Reply | Threaded
Open this post in threaded view
|

Re: clang-8: error: unknown argument: '-flto-partition=none' when building lxml

In reply to this post by slacka
> uses $$CFLAGS (i.e., whathever the CFLAGS env var is set to
in the shell run by `make`)

It's not coming from shell CFLAGS. I have searched all shell and environment variables with:
$( set -o posix ; set ) | less
And nothing has a '-flto-partition=none'  

Any other ideas on where to find this or how to override it?

This is definitely distro specific, as Ubuntu still works fine. Also, it was a fairly recent change in Arch. Could it have happened when I upgraded gcc, or if not what might it be?

Thanks,

-Luke
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Miklos Vajna-4 Miklos Vajna-4
Reply | Threaded
Open this post in threaded view
|

Re: clang-8: error: unknown argument: '-flto-partition=none' when building lxml

Hi,

On Mon, Sep 17, 2018 at 06:17:24PM +0000, Luke Benes <[hidden email]> wrote:
> Any other ideas on where to find this or how to override it?

Did you try --disable-lxml? All you loose is some pretty error reporting
for the .ui file checker.

Unless you want to fix the problem yourself. (I did have this problem
with clang-3.something, it went away when I upgraded to clang 5.)

Regards,

Miklos

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (201 bytes) Download Attachment