DSD 1.7 compile

Status
Not open for further replies.

sniper1990

Member
Joined
Jun 10, 2015
Messages
21
Location
Catalonia,Spain
Hello all!
I have the dsd 1.7 compiled on my Ubuntu System but I want to port for windows.
¿What commands I need for compile the ".exe" to windows systems?
Greetings!
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
While you did ask for commands to cross-compile DSD v1.7 in Linix for Windows (exe), I'll link to a post of mine that details how compile in Windows for Windows if you wish to go that path.

If your just after the binaries, then DRL-XM43 link should do the trick.
 

sniper1990

Member
Joined
Jun 10, 2015
Messages
21
Location
Catalonia,Spain
Thanks in advance but i dont know what error is this and i can't continue :( (im using windows 10 64 bits with cygwin64)
Greetings!Captura.PNG
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
It's a bit hard to read that screenshot and the Spanish makes it even harder.

Try redoing the 'make' command. From memory, sometimes you needed to do it twice. Not sure why.
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
The warnings at 9% and 17% are OK to ignore.
I've never bothered to fix so there are no longer seen. Also C is something I don't normally use. I read up on it, then don't use it for ages then I forget.:unsure:
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
As an addition to the compile instructions (I linked to) for the DSD 1.7 section.
Fix some errors that are seen in compile @ 9% and 17%:
Code:
 9% error = Add a define for strptime()
17% error = extern keyword not needed for optarg, optind, opterr, optopt

Edit file 'dsd_main.c' at 'home\USERNAME\dsd-master1.7\src\' and remove the keyword 'extern' from lines 456 and 457.
==========================================
 453 main (int argc, char **argv)
 454 {
 455  int c;
*456  char *optarg;
*457  int optind, opterr, optopt;
==========================================

Edit file 'dsd.h' at 'home\USERNAME\dsd-master1.7\include\' and add 3 lines at line 20.
==========================================
*20 #ifdef __CYGWIN__
*21 #define _XOPEN_SOURCE
*22 #endif
 23 #include "config.h"                    <---- this was the old line 20
==========================================


If you see the below error, just redo 'make'
[ 70%] Linking CXX executable dsd.exe
/usr/lib/gcc/i686-pc-cygwin/7.3.0/../../../../i686-pc-cygwin/bin/ld: reopening d
sd.exe: Device or resource busy

/usr/lib/gcc/i686-pc-cygwin/7.3.0/../../../../i686-pc-cygwin/bin/ld: final link
failed: Device or resource busy
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/dsd.dir/build.make:982: dsd.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/dsd.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
I made an error in the last post and didn't test the right file after I re-compiled. It caused a error on running dsd.

The following seems to work: (I have only tested on DMR)
Code:
Edit file 'dsd_main.c' at 'home\USERNAME\dsd-master1.7\src\' and comment out lines 456 and 457.
==========================================
 453 main (int argc, char **argv)
 454 {
 455  int c;
*456  // extern char *optarg;
*457  // extern int optind, opterr, optopt;
==========================================
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
The changes that I posted only deals with the 2 warnings @ 9% and 17%

The error you are seeing has to do with 'help2man'.
On my setup, 'help2man' is not present so it skips of that part in cmake. Did you install 'help2man'?

After running 'cmake ..' there will be a file in '\build' folder called 'CMakeCache.txt', open it and search for line with 'HELP2MAN'
The line could be:
Code:
HELP2MAN_FOUND:FILEPATH=HELP2MAN_FOUND
HELP2MAN_FOUND:FILEPATH=HELP2MAN_FOUND-NOTFOUND

If it found it, you would need to problem solve the 2 files referenced (build.make and Makeile2) to see why it's failing.

Alternatively you could edit the 'CMakeLists.txt' in your /home/Interface/dsd1.7 folder and comment out the reference to 'help2man'
In mine, it's lines 37 to 49. DSD seems to work without this that I can tell anyway.
After edit, clear build folder and redo 'cmake ..', 'make' and 'make install'

Comment out all this: (from 'CMakeLists.txt' in your /home/Interface/dsd1.7 folder)
Code:
# man page
find_program(HELP2MAN_FOUND help2man)
if (HELP2MAN_FOUND)
    add_custom_command(TARGET dsd POST_BUILD
        COMMAND help2man
        ARGS -n "Digital Speech Decoder"
            --version-string=${GIT_TAG}
            -o ${CMAKE_CURRENT_BINARY_DIR}/dsd.1
            --no-info
            $<TARGET_FILE:dsd> 
    )
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dsd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
 

sniper1990

Member
Joined
Jun 10, 2015
Messages
21
Location
Catalonia,Spain
This is insane!
Captura.PNG
Perfect now i need to port for windows with this command but i dont find the files ???
command is like this:
gcc -O2 -Wall -L/usr/local/lib -o dsd mbelib.o dsd_main.o dsd_symbol.o dsd_dibit.o dsd_frame_sync.o dsd_file.o dsd_audio.o dsd_serial.o dsd_frame.o dsd_mbe.o dsd_upsample.o p25p1_hdu.o p25p1_ldu1.o p25p1_ldu2.o p25p1_tdulc.o p25_lcw.o x2tdma_voice.o x2tdma_data.o dstar.o nxdn_voice.o nxdn_data.o dmr_voice.o dmr_data.o provoice.o ambe3600x2250.o imbe7200x4400.o ecc.o imbe7100x4400.o
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
Perfect now i need to port for windows with this command but i dont find the files ???
command is like this:
gcc -O2 -Wall -L/usr/local/lib -o dsd mbelib.o dsd_main.o dsd_symbol.o dsd_dibit.o dsd_frame_sync.o dsd_file.o dsd_audio.o dsd_serial.o dsd_frame.o dsd_mbe.o dsd_upsample.o p25p1_hdu.o p25p1_ldu1.o p25p1_ldu2.o p25p1_tdulc.o p25_lcw.o x2tdma_voice.o x2tdma_data.o dstar.o nxdn_voice.o nxdn_data.o dmr_voice.o dmr_data.o provoice.o ambe3600x2250.o imbe7200x4400.o ecc.o imbe7100x4400.o

The instructions that I posted link to will build DSD 1.7 for windows, I don't know why you need above command.
The required file locations (for exe and DLLs) are also explained in instructions I posted.
 

sniper1990

Member
Joined
Jun 10, 2015
Messages
21
Location
Catalonia,Spain
The instructions that I posted link to will build DSD 1.7 for windows, I don't know why you need above command.
The required file locations (for exe and DLLs) are also explained in instructions I posted.
You checked the last photo?? When I use on windows he said "error".I don't have idea what is going wrong....
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
You checked the last photo?? When I use on windows he said "error".I don't have idea what is going wrong....
Looking at the image shows that file dates are all wrong for the DLLs. Some are older than expected.
Especially for mbelib-1.dll and cygittpp-8.dll. The dates on these 2 files should be the day you compiled.
If you have copied the DLLs from a different PC or other source then this won't work.
You are probably mixing 32 and 64 bit files and who knows what else.

All required files must be pulled from the Cygwin install folders as mentioned in the instructions.

I tested compiling today (with success) in a new Windows 10 64 bit setup.
I tested compiling with both Cygwin 32 and 64 bit versions. (with success)
The only difference from the instructions I posted was I had to additionally install 'Python' and setup some variables in windows.

dsd seems to run without crashing.
I can only test playback (-r) in this Windows 10 as it is a VM, but coping files to a real PC and running I can get it to work as normal.
 

sniper1990

Member
Joined
Jun 10, 2015
Messages
21
Location
Catalonia,Spain
Ok i find the dll's on the folder "cygwin64/bin".Now im only need the "cyglapack-0.dll" i can't find on the system.You know something?
Of course i can launch dsd.exe only on cygwin terminal.
Captura.PNG
THX!
 
Last edited:

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,890
Ok i find the dll's on the folder "cygwin64/bin".Now im only need the "cyglapack-0.dll" i can't find on the system.You know something?
Of course i can launch dsd.exe only on cygwin terminal.
THX!
Why do you need "cyglapack-0.dll"? Is it asking for it?

I know when compiling itpp it says:
BLAS library not found.
LAPACK library not found.
FFT library not found.

I'm not certain that they required. DSD seems to work without it.

You will probably need to add those dependencies from the Cygwin installer. Do 'Category' search for 'openblas', 'lapack' and 'fft'.
You will have to decide what is the right package to install.
 
Status
Not open for further replies.
Top