Search code examples
macosmakefileuvmsystemc

UVM-SystemC MACOSX make error


I'm trying to run uvm-systemc on macosx. Link to download: http://accellera.org/images/downloads/drafts-review/uvm-systemc-1.0-alpha1.tar.gz

In the install flow, ../configure works fine, but on make i get this error:

Making all in macros
  CCLD   libmacros.la
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make[4]: *** [libmacros.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

I've looked online, and it seems that it is a makefile problem. However the uvm-systemc makefile is way to complex for me to comprehend where the issue could reside. Any ideas on why is this happening?

Thanks


Solution

  • The issue is due to the libtool being executed to create a library file without a cpp file . The tlm1 directory (and macros directory) do not have any .cpp file , hence there is no need to call the libtool in the respective makefiles.

    As the UVM-SystemC for Mac OS is not in the list of tested OS you MAY run a few more issues. I ran into 3 issues ( including the one mentioned above ). workaround to those are provided below .

    The OS version for which the installation was completed.

    ProductName:    Mac OS X
    ProductVersion: 10.11.4
    BuildVersion:   15E65
    

    1)

    command :

    step 1

    ../configure --with-systemc=[systemC-Base]/systemc-2.3.1
    

    step 2 :

    [base]/uvm-systemc-1.0-alpha1/objdir/ make

    Error:

    Making all in macros
      CCLD   libmacros.la
    ar: no archive members specified
    usage:  ar -d [-TLsv] archive file ...
        ar -m [-TLsv] archive file ...
        ar -m [-abiTLsv] position archive file ...
        ar -p [-TLsv] archive [file ...]
        ar -q [-cTLsv] archive file ...
        ar -r [-cuTLsv] archive file ...
        ar -r [-abciuTLsv] position archive file ...
        ar -t [-TLsv] archive [file ...]
        ar -x [-ouTLsv] archive [file ...]
    make[4]: *** [libmacros.la] Error 1
    make[3]: *** [all-recursive] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all] Error 2
    make:  [all-recursive] Error 1
    

    Fix :


    changes to 2 files

    [ objdir - is the run temporary directory for the make script ]

    [base]/uvm-systemc-1.0-alpha1/objdir/src/uvmsc/tlm1/Makefile - comment out the libtool run.

    line 314

    #       $(AM_V_CCLD)$(LINK)  $(libtlm1_la_OBJECTS) $(libtlm1_la_LIBADD) $(LIBS)
    

    [base]/uvm-systemc-1.0-alpha1/objdir/src/uvmsc/macros/Makefile

    line 311

      #       $(AM_V_CCLD)$(LINK)  $(libmacros_la_OBJECTS) $(libmacros_la_LIBADD) $(LIBS)
    

    OR

      [ for this you have to re-run  
     ../configure --with-systemc=[systemC-Base]/systemc-2.3.1 
       so that it can recreated the 
     <base>/uvm-systemc-1.0-alpha1/objdir/src/uvmsc/tlm1/Makefile
     and the 
      [base]/uvm-systemc-1.0-alpha1/objdir/src/uvmsc/macros/Makefile ]
    

    comment out the libtool run in the base file.

    [base]/uvm-systemc-1.0-alpha1/src/uvmsc/tlm1/Makefile.in

    line 314

    #       $(AM_V_CCLD)$(LINK)  $(libtlm1_la_OBJECTS) $(libtlm1_la_LIBADD) $(LIBS)
    

    [base]/uvm-systemc-1.0-alpha1/src/uvmsc/macros/Makefile

    line 311

      #       $(AM_V_CCLD)$(LINK)  $(libmacros_la_OBJECTS) $(libmacros_la_LIBADD) $(LIBS)
    

    ———————————

    2)

    Command :
    make install

    Error :

    /bin/sh: ../../../config/install-sh: Permission denied

    Fix :

     [[base]/uvm-systemc-1.0-alpha1/objdir]  chmod +x   ../config/install-sh 
    

    3)

    Command:

    make check

    Error :

    [systemC-base]/systemc-2.3.1/include/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h:32:3: note: constrained by private inheritance here private virtual tlm_put_if< PUT_DATA > ,

    [systemC-base]/systemc-2.3.1/include/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h:87:7: error: inherited virtual base class 'tlm_blocking_get_if' has private destructor class tlm_master_imp :

    [systemC-base]/systemc-2.3.1/include/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h:33:3: note: constrained by private inheritance here private virtual tlm_get_peek_if< GET_DATA > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [systemc-base]/systemc-2.3.1/include/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h:87:7: error: inherited virtual base class 'tlm_nonblocking_get_if' has private destructor

    —————————

    Fix :

    ———————————

    This seems like a compiler related issue. MAYBE in some platforms this is okay but it failed for this platform. To fix this the source file of the systemC installation needs to be updated. You can update the source file and re-install - gmake install (systemC) or just update the include file.

    [systemC-base]/systemc-2.3.1/src/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h

    [systemC-Base]/obj/ - gmake install

    OR

    [systemC-base]/systemc-2.3.1/include/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h

    change line 31,32

    class tlm_put_get_imp :    
      private virtual tlm_put_if< PUT_DATA > ,    
      public  virtual tlm_get_peek_if< GET_DATA > // change from  private to public - private fails
    

    change line 86,87

    class tlm_master_imp :
      private tlm_put_get_imp< REQ , RSP > ,
      public virtual tlm_master_if< REQ , RSP > // change from  private to public - private fails