Linrad and Automatic tuning from Map65.

142 views
Skip to first unread message

gary simpkins

unread,
Jul 23, 2023, 8:20:37 AM7/23/23
to Linrad
Hi 
I would like to use W3sz " Automatic tuning of Linrad by Map65." with linrad64.
It works fine with 32 bit linrad but I get a errors when I try to build for 64 bit Linrad.

Without the w3sz mods linrad builds 32 and 64 bit fine.
The Make64 process has issues with the wusers_hwaredriver.c file when building for 64bit.

the first error is:-
wusers_hwaredriver.c: In function 'userdefined_u':
wusers_hwaredriver.c:153:8: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict]
 strcat(zro,zro);

Has anyone built a Linrad64 using this solution. Or even have a newer solution.
The 32 built solution works fine and all the linrad sessions follow the MAP65 Frequency.

Regards
Gary G8EOH

Franco Venturi

unread,
Jul 26, 2023, 9:11:35 AM7/26/23
to Linrad
Gary, I apologize I am answering you only now; I was on vacation and I am now catching up on my emails and messages.

I just ran these commands here:

cd linrad
mv users_w3sz.c wusers_hwaredriver.c
mv extra_w3sz.c users_extra.c
cp Makefile.msys2.nodebug Makefile
make linrad64.exe

ls -l linrad64.exe


and I see linrad64.exe being built without any error.

73,
Franco K4VZ

Gary.simpkins

unread,
Jul 26, 2023, 2:44:01 PM7/26/23
to lin...@googlegroups.com
Hi Franco.
Don't you need to run configure to enable the make64 to use the 2 new .c files.
It's when I do this I find the 64 bit version fails

Regards
Gary

Franco Venturi

unread,
Jul 26, 2023, 10:24:39 PM7/26/23
to Linrad
Gary, good point about running 'configure'.

After I ran it, 'make linrad64' failed with many errors; the first of them was exactly the one you mentioned in line 153 with 'strcpy(zro,zro);'.

The reason for that error is explained in the man page for 'strcpy()':

CAVEATS
       The strings src and dst may not overlap.

and 'zro' and 'zro' obviously overlap.

I was able to workaround that error message by using a temporary variable to avoid the overlap; i.e. I replaced that 'strcpy(zro,zro);' with something like this:

    char tmp[80]=""; strcpy(tmp,zro); strcat(zro,tmp);

Unfortunately compiling that file throws many more errors, that would need to be addressed one by one.


(whispering) if you want to do something quick and dirty, you could remove that '-Werror' from the compiler flags in the Makefile, and it will compile because it will consider those issues as just warnings, but please don't tell anyone I suggested you to try that hihi

73,
Franco K4VZ

Gary.simpkins

unread,
Jul 27, 2023, 3:36:00 PM7/27/23
to lin...@googlegroups.com
How far did you travel in the campervan?. The states are huge compared to our little Island.
Sounds like you really enjoyed the trip. I used to go sailing for my holidays. I had a small 12M yacht and sailed from UK to France Belgium and the Netherlands. Have had to give it up recently. Managing the sails alone was getting too much for me and my wife who is 83 decided she had had enough bouncing around the North Sea. 
I miss it a lot. Still  -  gives me more time for Radio. I have a IC7300. Great little box. Only a simple vertical for 80M to 10M.Good enough for my HF needs. VHF for 2 is 4x12 ele xpol yagi.
Smaller single yagi for 23cm and 70cm.
I am lucky I have spare rooms and one is a large Shack. I envy the wide open spaces is the US.

Keep well.
Gary




From: lin...@googlegroups.com <lin...@googlegroups.com> on behalf of Franco Venturi <fven...@comcast.net>
Sent: Thursday, July 27, 2023 3:24:44 am
To: Linrad <lin...@googlegroups.com>
Subject: Re: [Linrad] Re: Linrad and Automatic tuning from Map65.
--
There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
---
You received this message because you are subscribed to a topic in the Google Groups "Linrad" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/linrad/aG4Rmt3Iwdk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to linrad+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linrad/7f419e71-9a08-4f72-a869-01ca9ace4085n%40googlegroups.com.

Leif Asbrink

unread,
Jul 27, 2023, 8:33:58 PM7/27/23
to lin...@googlegroups.com
Hello Gary and Franco,

Compilers become better and better and detect errors that were ignored before.

The present problem comes from these lines in users_w3sz.c:
if ((freq < 10E10) && (freq >=10E9))
{
strcat(zro,zro);
strcat(zro,ft);
strncpy(ft2,zro,12);
}
else if (freq < 10E9)
{
strcat(zro,zro);
strcat(zro,zr1);
strcat(zro,ft);
strncpy(ft2,zro,12);
}

I have not analyzed the code, but it is commented and starts
on line 63. It should not be too difficult to figure out what
the code was intended to do.

73

Leif
> > Sent from Outlook for Android <https://aka.ms/AAb9ysg>
> >
>
> --
> There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
> http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
> ---
> You received this message because you are subscribed to the Google Groups "Linrad" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.

Conrad PA5Y

unread,
Aug 4, 2023, 3:56:05 AM8/4/23
to lin...@googlegroups.com
Hello Leif.

I intend to buy a Perseus 22 and want to use it for adaptive EME on 50 and 144MHz, would you consider adding support for it? When I buy one I will provide the hardware.

Regards

Conrad PA5Y

Leif Asbrink

unread,
Aug 5, 2023, 6:29:24 PM8/5/23
to lin...@googlegroups.com
Hello Conrad,

My time is very limited nowadays, I spend the time available for radio
related things on experiments with sideband noise in oscillators.

Maybe someone else would be interested. If so I would happily include
code for Perseus 22 in the standard distribution.

73

Leif
> --
> There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
> http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
> ---
> You received this message because you are subscribed to the Google Groups "Linrad" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linrad/AM0P189MB07723E344DC750DD644CD416B509A%40AM0P189MB0772.EURP189.PROD.OUTLOOK.COM.

Conrad PA5Y

unread,
Aug 6, 2023, 5:27:20 AM8/6/23
to lin...@googlegroups.com
I understand. I would not know where to start or I would do it myself. Maybe one of my colleagues can help me, some of them are very clever 😊

73

Conrad PA5Y
To view this discussion on the web visit https://groups.google.com/d/msgid/linrad/20230806002920.672e8cf53e70c8a36b9dcd38%40sm5bsz.com.

MRO

unread,
Jan 1, 2024, 10:30:34 AMJan 1
to Linrad
Dear friends,
I have been trying to compile Linrad with W3SZ's Map65 additions for Windows 64-bit without success.  Linrad source code without the Map65 additions compiles easily, both 32- and 64-bit.   Adding the changed files for Map65 frequency control generates errors for 64-bits and the compilation fails as described previously in this thread.  Has any solution been found?
Thanks,
W9IP

Leif Asbrink

unread,
Jan 3, 2024, 12:01:15 AMJan 3
to lin...@googlegroups.com
Hello Michael,

Which file are you trying to compile and what is the error message?

73

Leif

> Dear friends,
> I have been trying to compile Linrad with W3SZ's Map65 additions for
> Windows 64-bit without success. Linrad source code *without *the Map65

Roger Rehr

unread,
Jan 3, 2024, 7:06:25 AMJan 3
to lin...@googlegroups.com
Hi Mike!

Assuming I can reproduce your error, this should be an easy fix. I am busy at my remote EME site this morning but I will get this fixed this afternoon unless someone else has already posted the fix by that time .

Have a great day!

73 ,

Roger

nl...@nlsa.com

unread,
Jan 3, 2024, 7:54:25 AMJan 3
to lin...@googlegroups.com

Dear Leif and Roger,

Using the source code from https://www.sm5bsz.com/linuxdsp/archive/lir05-02.zip along with W3SZ's automatic tuning file re-names https://w3sz.com/LinradMAP65.htm .

  • Run Configure.exe
  • If I type “Make Linrad” or “Make Linrad64,” Linrad.exe (32-bit) is created.  No errors
  • If I type “Make64 Linrad64,” compilation seems to proceed normally until near the end…

In file included from hwaredriver.c:56:

wusers_hwaredriver.c: In function 'userdefined_u':

wusers_hwaredriver.c:153:8: error: passing argument 1 to 'restrict'-qualified parameter aliases with argument 2 [-Werror=restrict]

  153 | strcat(zro,zro);

      |        ^~~ ~~~

wusers_hwaredriver.c:159:8: error: passing argument 1 to 'restrict'-qualified parameter aliases with argument 2 [-Werror=restrict]

  159 | strcat(zro,zro);

      |        ^~~ ~~~

wusers_hwaredriver.c: In function 'userdefined_q':

wusers_hwaredriver.c:289:8: error: passing argument 1 to 'restrict'-qualified parameter aliases with argument 2 [-Werror=restrict]

  289 | strcat(zro,zro);

      |        ^~~ ~~~

wusers_hwaredriver.c:295:8: error: passing argument 1 to 'restrict'-qualified parameter aliases with argument 2 [-Werror=restrict]

  295 | strcat(zro,zro);

      |        ^~~ ~~~

wusers_hwaredriver.c: In function 'init_users_control_window':

wusers_hwaredriver.c:357:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  357 |         *w3szfile="aahsmsfile";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:358:3: note: here

  358 |   case MODE_QRSS:

      |   ^~~~

wusers_hwaredriver.c:363:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  363 |         *w3szfile="aancw_file";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:364:3: note: here

  364 |   case MODE_SSB:

      |   ^~~~

wusers_hwaredriver.c:369:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  369 |         *w3szfile="aafm__file";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:370:3: note: here

  370 |   case MODE_AM:

      |   ^~~~

wusers_hwaredriver.c:371:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  371 |         *w3szfile="aaam__file";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:372:3: note: here

  372 |   case MODE_TXTEST:

      |   ^~~~

wusers_hwaredriver.c:373:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  373 |         *w3szfile="aatxtefile";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:374:3: note: here

  374 |   case MODE_RX_ADTEST:

      |   ^~~~

wusers_hwaredriver.c:375:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  375 |         *w3szfile="aarxadfile";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:376:3: note: here

  376 |   case MODE_TUNE:

      |   ^~~~

wusers_hwaredriver.c: In function 'show_user_parms':

wusers_hwaredriver.c:478:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  478 |         *w3szfile="aahsmsfile";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:479:3: note: here

  479 |   case MODE_QRSS:

      |   ^~~~

wusers_hwaredriver.c:484:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  484 |         *w3szfile="aancw_file";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:485:3: note: here

  485 |   case MODE_SSB:

      |   ^~~~

wusers_hwaredriver.c:490:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  490 |         *w3szfile="aafm__file";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:491:3: note: here

  491 |   case MODE_AM:

      |   ^~~~

wusers_hwaredriver.c:492:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  492 |         *w3szfile="aaam__file";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:493:3: note: here

  493 |   case MODE_TXTEST:

      |   ^~~~

wusers_hwaredriver.c:494:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  494 |         *w3szfile="aatxtefile";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:495:3: note: here

  495 |   case MODE_RX_ADTEST:

      |   ^~~~

wusers_hwaredriver.c:496:18: error: this statement may fall through [-Werror=implicit-fallthrough=]

  496 |         *w3szfile="aarxadfile";

      |         ~~~~~~~~~^~~~~~~~~~~~~

wusers_hwaredriver.c:497:3: note: here

  497 |   case MODE_TUNE:

      |   ^~~~

wusers_hwaredriver.c: In function 'userdefined_u':

wusers_hwaredriver.c:168:1: error: 'strncpy' output may be truncated copying 12 bytes from a string of length 79 [-Werror=stringop-truncation]

  168 | strncpy(ft2,zro,12);

      | ^~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c:155:1: error: 'strncpy' output may be truncated copying 12 bytes from a string of length 79 [-Werror=stringop-truncation]

  155 | strncpy(ft2,zro,12);

      | ^~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c:162:1: error: 'strncpy' output may be truncated copying 12 bytes from a string of length 79 [-Werror=stringop-truncation]

  162 | strncpy(ft2,zro,12);

      | ^~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c:171:1: error: 'strncpy' output may be truncated copying 10 bytes from a string of length 79 [-Werror=stringop-truncation]

  171 | strncpy(ffin,ft2,10);

      | ^~~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c: In function 'userdefined_q':

wusers_hwaredriver.c:304:1: error: 'strncpy' output may be truncated copying 12 bytes from a string of length 79 [-Werror=stringop-truncation]

  304 | strncpy(ft2,zro,12);

      | ^~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c:291:1: error: 'strncpy' output may be truncated copying 12 bytes from a string of length 79 [-Werror=stringop-truncation]

  291 | strncpy(ft2,zro,12);

      | ^~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c:298:1: error: 'strncpy' output may be truncated copying 12 bytes from a string of length 79 [-Werror=stringop-truncation]

  298 | strncpy(ft2,zro,12);

      | ^~~~~~~~~~~~~~~~~~~

wusers_hwaredriver.c:307:1: error: 'strncpy' output may be truncated copying 10 bytes from a string of length 79 [-Werror=stringop-truncation]

  307 | strncpy(ffin,ft2,10);

      | ^~~~~~~~~~~~~~~~~~~~

cc1.exe: all warnings being treated as errors

mingw32-make: *** [hwaredriver.ox] Error 1

 

C:\Users\MRO\linrad>endlocal

-W9IP

 

-----Original Message-----
From: lin...@googlegroups.com <lin...@googlegroups.com> On Behalf Of Leif Asbrink
Sent: Wednesday, January 03, 2024 12:01 AM
To: lin...@googlegroups.com
Subject: Re: [Linrad] Perseus 22 dual channel support

 

Hello Michael,

--

There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:

http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf

---

You received this message because you are subscribed to a topic in the Google Groups "Linrad" group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/linrad/aG4Rmt3Iwdk/unsubscribe.

To unsubscribe from this group and all its topics, send an email to linrad+un...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/linrad/20240103060111.396baf17d2408376407449d3%40sm5bsz.com.

Leif Asbrink

unread,
Jan 3, 2024, 11:39:41 PMJan 3
to lin...@googlegroups.com
Hello Michael and Roger,

Have a look at the file users_w3sz.c in lir05-02.zip where similar errors
are corrected.

73

Leif


> Dear Leif and Roger,
>
> Using the source code from https://www.sm5bsz.com/linuxdsp/archive/lir05-02.zip along with W3SZ's automatic tuning file re-names https://w3sz.com/LinradMAP65.htm .
>
> * Run Configure.exe
> * If I type “Make Linrad” or “Make Linrad64,” Linrad.exe (32-bit) is created. No errors
> * If I type “Make64 Linrad64,” compilation seems to proceed normally until near the end…

Roger Rehr

unread,
Jan 7, 2024, 12:27:40 PMJan 7
to lin...@googlegroups.com
Hi Mike,

Modifying the code so that it successfully 64-bit compiles linrad64.exe turned out to be pretty simple.  The problem was just that more "modern" 64-bit compilers have progressively tightened their restrictions so that code that was acceptable to older compiler versions is now associated with warnings/errors that prevent compilation.  Mitigating this and achieving successful compilation was quickly done, but then there was a second issue caused by the particular version of the mingw-w64 compiler that I was using.

This second compiler-version issue occured because the mingw-w64 installer linked from Leif's page has been broken for a couple of years and wouldn't install mingw-w64 (this is a known problem well documented on the web), and the compiler that I had chosen to install instead compiled the modified code OK, but linrad64 would crash each time the receive page was entered.

It took me a while to figure out that the compiler version that I was using was the problem and not my code, but once I figured that out I was able to download a compiler version that successfully compiles linrad64.exe using my modified extra_w3sz.c and users_w3sz.c files and this linrad64.exe then runs without errors, including properly tracking the MAP65 frequency as intended.

The modified files will NOT work with the "stock" 32-bit mingw compiler linked from Leif's page, but the original
extra_w3sz.c and users_w3sz.c files downloaded via Leif's web page work for that purpose.

In order to build a version of linrad64 that runs without error the recipe that I suggest is:

1. From https://sourceforge.net/projects/mingw-w64/files/ click on the link labeled x86_64-posix-seh  
which will download the file: x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z.
2. Unzip this file into the folder x86_64-8.1.0-release-posix-seh-rt_v6-rev0
3. Create the directory C:\mingw64
4. Copy the folder mingw64 from the folder you created (x86_64-8.1.0-release-posix-seh-rt_v6-rev0)
into the directory you created (C:\mingw64), so that you have the directory structures:
C:\mingw64\mingw64\bin,
C:\mingw64\mingw64\etc,
C:\mingw64\mingw64\include, etc., etc.
5. Set the windows environment path to include C:\mingw64 (good practice even though Leif used
absolute addressing in his compile/linking code).
6. Download my modified files
extra_w3sz.c and users_w3sz.c from
https://w3sz.com/extra_w3sz.c
https://w3sz.com/users_w3sz.c
7. Place the modified files extra_w3sz.c and users_w3sz.c into your linrad directory.
8. Rename the modified users_w3sz.c to wusers_hwaredriver.c and rename the modified file
extra_w3sz.c to users_extra.c Note that these modified files will NOT work for 32 bit compiles with
the version of the mingw compiler as listed on Leif’s webpage, but the original unmodified files work for 32-bit compiles so the modified files are not needed in that case.
9. In your linrad directory type make64

If you do the above, linrad64.exe should compile and run fine...it does here. If there are issues, please
let me know.

73,

Roger Rehr
W3SZ


On 1/3/2024 07:05 AM, Roger Rehr wrote:
Hi Mike!

Assuming I can reproduce your error, this should be an easy fix. I am busy at my remote EME site this morning but I will get this fixed this afternoon unless someone else has already posted the fix by that time .

Have a great day!

73 ,

Roger

On Jan 3, 2024, at 12:04 AM, Leif Asbrink <le...@sm5bsz.com> wrote:
Hello Michael,

Which file are you trying to compile and what is the error message?

 73

  Leif

Dear friends, I have been trying to compile Linrad with W3SZ's Map65 additions for Windows 64-bit without success. Linrad source code *without *the Map65 additions compiles easily, both 32- and 64-bit. Adding the changed files for Map65 frequency control generates errors for 64-bits and the compilation fails as described previously in this thread. Has any solution been found? Thanks, W9IP
--
There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
---
You received this message because you are subscribed to the Google Groups "Linrad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linrad/fc082c1f-0da8-46bb-a3fd-fd835a520b02%40comcast.net.

Roger Rehr

unread,
Jan 7, 2024, 5:59:21 PMJan 7
to lin...@googlegroups.com
Hi All,

Mike noticed and kindly pointed out to me that I left "configure" out of my recipe.  Of course the recipe won't work without it.  So step #9 should read:  In your linrad directory type "configure" , hit "Enter", and then type "make64" and hit "Enter". 

Sorry about that!

I have updated my "Automatic tuning of Linrad by MAP65" page to reflect all of this and there is a link to a pdf file there that contains the recipe and further details applicable to BOTH linux and windows builds using modern compilers with the two _w3sz files in question.  The web page is at
https://w3sz.com/LinradMAP65.htm

 and the linked pdf is at

https://w3sz.com/RecipeForCompilingLinrad64.pdf

73,
Roger
W3SZ
Reply all
Reply to author
Forward
0 new messages