[llvm-dev] Building libjpeg-turbo with LTO

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 8 11:01:43 PDT 2020


Are the object files for jcstest.c and the source files defining these
symbols being directly LTO linked together, or are the defs first LTO
linked into a shared library? It would be helpful to see the build commands
involved.
Teresa

On Wed, Apr 8, 2020 at 10:25 AM Shishir V Jessu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> To correct a typo: I am using both clang 6.0.0, and a local build of clang
> 10.0.0, and each result in the same error.
>
> Best,
> Shishir Jessu
>
> On Wed, Apr 8, 2020 at 12:22 PM Shishir V Jessu <shishir.jessu at utexas.edu>
> wrote:
>
>> Hi,
>>
>> I have tried to build libjpeg-turbo
>> <https://github.com/libjpeg-turbo/libjpeg-turbo> with LTO in LLVM, using
>> both clangbut get many errors in lld that look like the following:
>>
>> ld: error: undefined symbol: jpeg_std_error
>> >>> referenced by jcstest.c:76
>> >>>               lto.tmp:(main)
>>
>> ld: error: undefined symbol: jpeg_CreateCompress
>> >>> referenced by jcstest.c:86
>> >>>               lto.tmp:(main)
>>
>> ld: error: undefined symbol: jpeg_set_defaults
>> >>> referenced by jcstest.c:88
>> >>>               lto.tmp:(main)
>>
>> ld: error: undefined symbol: jpeg_default_colorspace
>> >>> referenced by jcstest.c:90
>> >>>               lto.tmp:(main)
>> >>> referenced by jcstest.c:114
>> >>>               lto.tmp:(main)
>>
>> This only occurs when compiling with the -flto flag. Has anyone been able
>> to build libjpeg-turbo with LTO? Are there any modifications I need to make
>> to the makefile or other configuration in order to do so? Thanks for your
>> help!
>>
>> Best,
>> Shishir Jessu
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200408/1569e317/attachment.html>


More information about the llvm-dev mailing list