[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #204

build fail w/ cygwin 2.674 and gcc 4.3.4

Added by Ivan Djordjevic over 3 years ago. Updated over 3 years ago.

Status:Closed Start date:01/15/2010
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:Configure/Make/Compiling
Target version:-

Description

verilator-3.720 fail on conflicting type declaration but manual change to typedef on uint32_t to int from long makes it build. But test_sp fails with a message that it cannot convert from WData to uint32_t. I am suspecting the above hack to make it compile did some subtle damage.

cd obj_dbg && make  TGT=../../verilator_bin_dbg VL_DEBUG=1 -f ../Makefile_obj
make[2]: Entering directory `/cygdrive/c/home/idjordje/zzzzz/verilator-3.720/src/obj_dbg'
      Compile flags:  g++ -I/usr/local/include -MMD -I. -I.. -I../../include -DYYDEBUG -ggdb -DVL_DEBUG 
      -DDEFENV_SYSTEMC="/cygdrive/c/home/idjordje/systemc-2.2.0" -DDEFENV_SYSTEMC_ARCH="" \
      -DDEFENV_SYSTEMPERL="/cygdrive/c/home/idjordje/SystemPerl-1.332"  \
      -DDEFENV_SYSTEMPERL_INCLUDE="/cygdrive/c/home/idjordje/SystemPerl-1.332/src" \
      -DDEFENV_VERILATOR_ROOT="/cygdrive/c/home/idjordje/verilator-3.720" 
g++ -I/usr/local/include -MMD -I. -I.. -I../../include -DYYDEBUG         -ggdb -DVL_DEBUG -c ../V3Parse.cpp
In file included from ../config_build.h:99,
                 from ../V3Ast.h:25,
                 from ../V3Parse.cpp:22:
../../include/verilatedos.h:83: error: conflicting declaration ‘typedef long unsigned int uint32_t’
/usr/include/stdint.h:28: error: ‘uint32_t’ has a previous declaration as ‘typedef unsigned int uint32_t’
make[2]: *** [V3Parse.o] Error 1
make[2]: Leaving directory `/cygdrive/c/home/idjordje/zzzzz/verilator-3.720/src/obj_dbg'
make[1]: *** [../verilator_bin_dbg] Error 2
make[1]: Leaving directory `/cygdrive/c/home/idjordje/zzzzz/verilator-3.720/src'
make: *** [verilator_exe] Error 2

History

Updated by Ivan Djordjevic over 3 years ago

Cygwin 2.674 is the version of the setup executable for cygwin. The actual cygwin release is the latest, 1.7.1

Updated by Wilson Snyder over 3 years ago

Ugh, Cygwin was non standard in that they had uint32_t==long, I guess they fixed it, but now every package has to change! Grr.

Try this patch

diff --git a/include/verilatedos.h b/include/verilatedos.h
index ea51529..efc6f9b 100644
--- a/include/verilatedos.h
+++ b/include/verilatedos.h
@@ -79,17 +79,22 @@

 #ifdef VL_UINTS_DEFINED
 #elif defined(__CYGWIN__)
 # include <stdint.h>
 typedef unsigned char           uint8_t;    ///< 8-bit unsigned type (backward compatibility)
 typedef unsigned short int      uint16_t;    ///< 16-bit unsigned type (backward compatibility)
-typedef unsigned long           uint32_t;    ///< 32-bit unsigned type (backward compatibility)
 typedef unsigned char           vluint8_t;    ///< 8-bit unsigned type
 typedef unsigned short int      vluint16_t;    ///< 16-bit unsigned type
-typedef long              vlsint32_t;    ///< 32-bit signed type
-typedef unsigned long           vluint32_t;    ///< 32-bit unsigned type
+# ifdef __uint32_t_defined      // uint32_t defined by stdint.h as an unsigned int
+typedef int32_t            vlsint32_t;    ///< 32-bit signed type
+typedef uint32_t        vluint32_t;    ///< 32-bit unsigned type
+# else
+typedef unsigned long        uint32_t;    ///< 32-bit unsigned type (backward compatibility)
+typedef long            vlsint32_t;    ///< 32-bit signed type
+typedef unsigned long        vluint32_t;    ///< 32-bit unsigned type
+# endif
 typedef long long        vlsint64_t;    ///< 64-bit signed type
 typedef unsigned long long      vluint64_t;    ///< 64-bit unsigned type
 #elif defined(_WIN32) && defined(_MSC_VER)
 typedef unsigned char           uint8_t;    ///< 8-bit unsigned type (backward compatibility)
 typedef unsigned short int      uint16_t;    ///< 16-bit unsigned type (backward compatibility)
 typedef unsigned int        uint32_t;    ///< 32-bit unsigned type (backward compatibility)

Updated by Ivan Djordjevic over 3 years ago

aye, indeed ... this patch solves the problem

Updated by Wilson Snyder over 3 years ago

  • Category set to Configure/Make/Compiling
  • Status changed from New to Resolved
  • Assignee set to Wilson Snyder

Fixed in git for next release. Thanks for reporting & debugging it.

Updated by Wilson Snyder over 3 years ago

  • Status changed from Resolved to Closed

In 3.800.

Also available in: Atom