[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build errors



On Wed, Oct 23, 2013 at 9:07 AM, David Malcolm <dmalcolm@redhat.com> wrote:
>> <snip>
>> make: *** [all] Error 2
>
> The above appears to be during the build of the "libgcc" library, which
> gets used at runtime on the target to support the code compiled by gcc.
> I'm not sure what went wrong, but things may just work with the libgcc
> you already have on your machine.

It turns out the error was from a second build attempt so the
important information was not included, sorry. I deleted the build dir
and retried and the actual error was:

checking for suffix of object files... configure: error: in
`/home/simon/projects/gccjit/build/x86_64-unknown-linux-gnu/32/libgcc':
configure: error: cannot compute suffix of object files: cannot compile

The following FAQs helped me figure it out:
http://gcc.gnu.org/wiki/FAQ#Configuration_fails_with_.27.27configure:_error:_cannot_compute_suffix_of_object_files:_cannot_compile.27.27._What_is_the_problem.3F

http://gcc.gnu.org/wiki/FAQ#gnu_stubs-32.h

Note this was the first time I've ever tried to build gcc. I'm running
ubuntu 13.04:
$ gcc -v
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)

The problem turned out to be debian multiarch shananagins and adding
"--disable-multilib" to configure fixed everything up.

Perhaps the gccjit wiki could have a note that people running into
build problems should consult the FAQ. Basically gccjit was my entry
point into building gcc and it might be helpful for others going down
a similar path (I'm also happy to add this kind of stuff to the wiki
if you think it makes sense.)

> BTW, note that as I'm hoping for the core jit branch to eventually be
> merged into gcc itself, for *that* code I have to follow the rules given
> here:
> http://gcc.gnu.org/contribute.html
> In particular, I can only accept patches for that code from people
> who've done the appropriate legal paperwork with the FSF.

If I ever get that deep into the code, I will make sure to get that
setup before submitting patches.

>> But I'm now hitting this when running test.py:
>> $ python3 test.py
>> .libgccjit.so: internal compiler error: Segmentation fault
>> ...
>> 0x7fad426c2485 gcc::jit::context::invoke_code_factory()
>>         ../../src/gcc/jit/internal-api.c:1345
>
> I'm not seeing that (with Python 3.2 fwiw).

I just tried with with Python 2.7 and it was broken as well. Note that
the first unittest "test_square" works well, only
"test_sum_of_squares" is blowing up. I'll try to debug this a bit
more.

> What version of the dmalcolm/jit branch are you using?   I added a lot
> of error-checking last Friday in
> d4019d9ddb77354c242798596268c7043bb7f3dd.

The clone was made yesterday (and I updated it again today).

Thanks,
-Simon