Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing plusargs to FLI: Find code that works with different TCL versions #1404

Closed
themperek opened this issue Feb 17, 2020 · 6 comments · Fixed by #1424
Closed

Passing plusargs to FLI: Find code that works with different TCL versions #1404

themperek opened this issue Feb 17, 2020 · 6 comments · Fixed by #1424
Labels
category:simulators simulator support, including VPI/GPI/etc. type:feature new or enhanced functionality

Comments

@themperek
Copy link
Contributor

themperek commented Feb 17, 2020

There is an error on RHEL7 (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)

Compilation error in ‘Tcl_Interp’ has no member named ‘result’

 cocotb/share/lib/fli/FliCbHdl.cpp:164:44: error: ‘Tcl_Interp’ has no member named ‘result’
       unsigned long argc_u = strtoul(interp->result, NULL, 10);
                                              ^
  cocotb/share/lib/fli/FliCbHdl.cpp:183:43: error: ‘Tcl_Interp’ has no member named ‘result’
           argv[i] = new char[strlen(interp->result)+1];
                                             ^
  cocotb/share/lib/fli/FliCbHdl.cpp:184:33: error: ‘Tcl_Interp’ has no member named ‘result’
           strcpy(argv[i], interp->result);
                                   ^

Seems to be related to #1256 @ktbarrett

@themperek themperek added the type:bug a bug in existing functionality label Feb 17, 2020
@imphil
Copy link
Member

imphil commented Feb 17, 2020

Is cocotb picking up the right tcl library and header file from Questa, or is it using the system-provided one?

@themperek
Copy link
Contributor Author

It looks as if it is ok for Questa 10.x but 2019.x fails.

@imphil
Copy link
Member

imphil commented Feb 17, 2020

Can you try reverting b283b48 and see if that fixes compilation? (If so, I'll back out this change until we find a solution that universally works.)

@themperek
Copy link
Contributor Author

themperek commented Feb 17, 2020

Checked b283b48 seems to be the problem.

@themperek
Copy link
Contributor Author

The version of tcl changed from 8.5 to 8.6

imphil added a commit to imphil/cocotb that referenced this issue Feb 17, 2020
This reverts commit b283b48.

The Questa-shipped TCL interface changed from TCL 8.5 to 8.6 in newer
versions, which is incompatible with this change.

See cocotb#1404
@imphil
Copy link
Member

imphil commented Feb 17, 2020

OK, revert in #1407. @ktbarrett can you look into finding a solution which works for both simulators? Ideally, one that doesn't involve conditional compilation (see #1392).

imphil added a commit that referenced this issue Feb 17, 2020
This reverts commit b283b48.

The Questa-shipped TCL interface changed from TCL 8.5 to 8.6 in newer
versions, which is incompatible with this change.

See #1404
@imphil imphil changed the title Compilation error in ‘Tcl_Interp’ has no member named ‘result’ Passing plusargs to FLI: Find code that works with different TCL versions Feb 17, 2020
@imphil imphil added category:simulators simulator support, including VPI/GPI/etc. type:feature new or enhanced functionality and removed type:bug a bug in existing functionality labels Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:simulators simulator support, including VPI/GPI/etc. type:feature new or enhanced functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants