Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

Issue #1460

fstapi.c compile errors.

Added by Richard Myers 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Configure/Make/Compiling
% Done:

0%


Description

Hi,

I get many errors like the following with Verilator 4.014 (and before) when compiling fstapi using mingw32 (under Linux):

verilator-4.014/include/gtkwave/fstapi.c:2752:46: error: expected ')' before 'PRIu32' elem_count_len = sprintf(elem_count_buf, "%" PRIu32, elem_count); ~ ^~~~~ ) ...

I've attached a patch file against verilatedos.h that fixes the problem in my environment (Fedora 29, mingw32-gcc-c++-8.3.0-2.fc29.x86_6).

Thanks! Richard

verilatedos.h.patch View - verilatedos.h patch file (1.45 KB) Richard Myers, 06/11/2019 06:18 AM

verilator-4.014.patch View (1.09 KB) Richard Myers, 06/12/2019 12:44 AM

History

#1 Updated by Wilson Snyder 6 months ago

  • Status changed from New to AskedReporter
  • Assignee set to Richard Myers

Thanks for debugging.

_WORDSIZE is defined in sys/types.h and your patch moves the test above this include, so I think this is likely to break for other compilers. Perhaps the VL_PRI64 needs to remain where it was, and only the USE_MINW_ANSI_STDIO and STDC_FORMAT_MACROS move up?

Also, just one time, please either edit the (new) docs/CONTRIBUTORS file to add your name and put that in the patch, or just post "I certify my contribution as described in https://developercertificate.org", to certify your contribution. Thanks.

#2 Updated by Richard Myers 6 months ago

Hi,

Yes, did it. Here's the new and improved patch that hopefully has a minimal effect on everyone else. I added my name. I'm already in the verilator.pdf doc file from back in the day (circa 2003...)

Thanks! Richard

#3 Updated by Wilson Snyder 6 months ago

  • Status changed from AskedReporter to Resolved

Looks good, thanks for the efforts.

Pushed to git towards 4.015.

#4 Updated by Wilson Snyder 6 months ago

  • Status changed from Resolved to Closed

In 4.016.

Also available in: Atom