public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Siegmar Gross <siegmar.gross@informatik.hs-fulda.de>
To: gcc@gcc.gnu.org
Subject: Re: gcc-7.3.0: ptxas lib_a-hash_func.o, line 11; fatal : Invalid initial value expression
Date: Sun, 25 Feb 2018 12:47:00 -0000	[thread overview]
Message-ID: <065a5e87-5f42-e002-5f57-924783a54d75@informatik.hs-fulda.de> (raw)
In-Reply-To: <87zi3yt4je.fsf@euler.schwinge.homeip.net>

Hi Thomas,

thank you very much for your help. I applied the patch to nvptx.c
and was able to build everything. The compiler works for my small
accelerator programs.

loki nvptx 147 diff nvptx.c nvptx.c.orig
1878,1881c1878
<       bool function = SYMBOL_REF_DECL (sym)
<       && (TREE_CODE (SYMBOL_REF_DECL (sym)) == FUNCTION_DECL);
<       if (!function)
<       fprintf (asm_out_file, "generic(");
---
 >       fprintf (asm_out_file, "generic(");
1883,1886c1880
<       if (!function)
<       fprintf (asm_out_file, val ? ") + " : ")");
<       else if (val)
<       fprintf (asm_out_file, " + ");
---
 >       fprintf (asm_out_file, val ? ") + " : ")");
loki nvptx 148


I'm not sure if I used CUDA 8 or CUDA 9 to build gcc-7.2.0, but I
assume it was already CUDA 9.

loki nvptx 148 ls -ld /usr/local/gcc-7.2.0/ /usr/local/cuda
lrwxrwxrwx 1 root root    8 Sep 27 09:15 /usr/local/cuda -> cuda-9.0
drwxr-xr-x 9 root root 4096 Nov  2 12:07 /usr/local/gcc-7.2.0/
loki nvptx 149


Thank you very much once more

Siegmar


Am 24.02.2018 um 23:18 schrieb Thomas Schwinge:
> Hi!
> 
> On Sat, 24 Feb 2018 17:20:13 +0100, Siegmar Gross <siegmar.gross@informatik.hs-fulda.de> wrote:
>> today I tried to install gcc-7.3.0 with accelerator support
> 
> Thanks for giving that a try and reporting back!
> 
>> on my "SUSE Linux Enterprise Server 12.3 (x86_64)" with
>> gcc-6.4.0. I used the following commands to download and build
>> everything.
> 
> Thanks for providing these (but I have not yet reviewed them in detail,
> because the problem might be solved already, see below).
> 
>> '../../../../../../gcc-7.3.0/newlib/libc/search/'`hash_func.c
>> ptxas lib_a-hash_func.o, line 11; fatal   : Invalid initial value expression
>> ptxas fatal   : Ptx assembly aborted due to errors
>> nvptx-as: ptxas returned 255 exit status
>> Makefile:413: recipe for target 'lib_a-hash_func.o' failed
>> make[8]: *** [lib_a-hash_func.o] Error 1
> 
> Am I right guessing that you're using CUDA 9?  Then it'd most likely be
> the issue discussed in <https://gcc.gnu.org/PR83790> "Update nvptx target
> to work with cuda 9".  By now, there has a fix been committed to GCC
> trunk, and I assume the same would also work on earlier GCC
> releases/branches.
> 
>> I was able to build that part for gcc-7.2.0 with the same commands.
> 
> Interesting.  Or, maybe you've not been using CUDA 9 in that build?
> 
> 
> Grüße
>   Thomas

      reply	other threads:[~2018-02-25 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 16:20 Siegmar Gross
2018-02-24 22:18 ` Thomas Schwinge
2018-02-25 12:47   ` Siegmar Gross [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=065a5e87-5f42-e002-5f57-924783a54d75@informatik.hs-fulda.de \
    --to=siegmar.gross@informatik.hs-fulda.de \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).