Bug 264831 - comms/wsjtx: Fortran runtime error fix
Summary: comms/wsjtx: Fortran runtime error fix
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: hamradio (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-22 17:06 UTC by Stephen Hurd
Modified: 2023-08-22 20:44 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (hamradio)


Attachments
Use size_t when building with clang (1.03 KB, patch)
2022-06-22 17:06 UTC, Stephen Hurd
no flags Details | Diff
fix for size_t when building with clang new patch (5.08 KB, patch)
2023-05-25 12:50 UTC, Diane Bruce
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Hurd freebsd_committer freebsd_triage 2022-06-22 17:06:14 UTC
Created attachment 234870 [details]
Use size_t when building with clang

With the current port build using clang, wsjtx will occasionally exit with a message along the lines of:

Fortran runtime error: Actual string length is shorter than the declared one for dummy argument 'msgsent' (-4294967274/22)

This is caused by using the wrong type for the hidden arguments that specify the character length when calling fortran subroutines from C.

The attached patch solves the issue.
Comment 1 Adrian Chadd freebsd_committer freebsd_triage 2022-09-08 16:58:49 UTC
ugh i just hit this.

can we land it? :)
Comment 2 Stephen Hurd freebsd_committer freebsd_triage 2023-05-14 04:39:48 UTC
Working and tested patch... anyone?
Comment 3 Diane Bruce freebsd_committer freebsd_triage 2023-05-23 14:06:30 UTC
urgh I will test this today.
Comment 4 Diane Bruce freebsd_committer freebsd_triage 2023-05-25 12:48:01 UTC
Quite a few errors with original patch which is why this was languishing... sorry

Looks like latest standard of c++ broke original patch e.g.

usr/include/c++/v1/__type_traits/enable_if.h:20:1: error: templates must have C++ linkage
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/db/ports/comms/wsjtx/work/.build/wsjtx-prefix/src/wsjtx-build/wsjtx_config.h:5:1: note: extern "C" language linkage specification begins here
extern "C"  {
^
In file included from <built-in>:1:
In file included from /usr/home/db/ports/comms/wsjtx/work/.build/wsjtx-prefix/src/wsjtx-build/wsjtx_config.h:63:
In file included from /usr/include/c++/v1/cstddef:38:
/usr/include/c++/v1/__type_traits/enable_if.h:21:50: error: explicit specialization of undeclared template struct 'enable_if'

...
Comment 5 Diane Bruce freebsd_committer freebsd_triage 2023-05-25 12:50:46 UTC
Created attachment 242392 [details]
fix for size_t when building with clang new patch

Please test this diff.