gccg++

A lot of ./libtool eval unexpected EOF while looking for matching `"' during build native gcc-14.2.0


I am trying to build native gcc-14.2.0 from sources by this tutorial - https://gist.github.com/chponte/7f27967fc72cf61e8c158923bf126b61

I am doing it on hyper-v with OS Astra Linux with installed gcc.

On the final stage of tutorial ( GCC (final) ) I get a lot of ./libtool eval unexpected EOF while looking for matching "'`

This errors does not appear at once, but one by one. Every time I fix such error by editing libtool in the relevant catalog as described here - https://github.com/protocolbuffers/protobuf/issues/3396#issuecomment-545518852 . Then build continues and after a time fails again with new ./libtool eval unexpected EOF while looking for matching "'` from libtool in another catalog.

Google does not give the common solution of this problem.

How can I fix this error once and for all?


Solution

  • Scripts with the name libtool are generated using ltmain.sh. You need to fix all (several) ltmain.sh once, and then errors

    ./libtool eval unexpected EOF while looking for matching `"'

    will not appear again and again.

    In ltmain.sh you need to replace:

    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
    

    with

    eval sys_lib_search_path='$sys_lib_search_path_spec'
    eval sys_lib_dlsearch_path='$sys_lib_dlsearch_path_spec'