compiling under debian 9

Questions and discussions around compiling of Rocrail, usage of wxWidgets etc.

Moderators: dadolphs, Moderators

compiling under debian 9

Postby pin88303 » 15.11.2017, 00:27

Hello,

Thx again to have access at the sources !

I try to compile but i got this error concerning the files app.c and version.h:

Code: Select all
gcc -c -fPIC -g -ansi -I.. -I../unxgen impl/tt.c -o ../unxgen/rocrail/bin/tt.o
gcc -c -fPIC -g -ansi -I.. -I../unxgen impl/waybill.c -o ../unxgen/rocrail/bin/waybill.o
gcc -c -fPIC -g -ansi -I.. -I../unxgen impl/app.c -o ../unxgen/rocrail/bin/app.o
In file included from impl/app.c:57:0:
../common/version.h:22:47: error: invalid operands to binary * (have ‘char *’ and ‘char *’)
../common/version.h:7:1:
 "9594 2015-08-08 15:18:19 +0200 translation merge\n" \
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../common/version.h:22:47:

 "9579 2015-08-05 15:18:34 +0200 stage: allow "*" for substate\n" \
                                               ^
../common/version.h:25:47: error: expected ‘,’ or ‘;’ before ‘save’
 "9576 2015-08-05 07:12:26 +0200 translation: "save position" changed in "safe switch position"\n" \
                                               ^~~~
makefile:117 : la recette pour la cible « ../unxgen/rocrail/bin/app.o » a échouée
make[2]: *** [../unxgen/rocrail/bin/app.o] Erreur 1
make[2] : on quitte le répertoire « /home/marc/rocrail/source/Rocrail-master-afae40a271b58e85471663ea7cc86b5ace9454f0/rocrail »
makefile:176 : la recette pour la cible « fromtar » a échouée
make[1]: *** [fromtar] Erreur 2


Don't really see what could it be

Regards

Marc
Marc
Rocrail's fan
Linux Debian 9
ord3, Sprog, mgv systemHo, 2 & 3 rails system
pin88303
 

Re: compiling under debian 9

Postby rjversluis » 15.11.2017, 07:30

Hi Marc,

at make begin the version.h is generated with git to provide a change history.
Make sure git is installed.

If you did not download the sources with git, but used a zip archive of the sources, you must use the make target offline:

Code: Select all
make offline
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: compiling under debian 9

Postby pin88303 » 15.11.2017, 18:54

Thanks Rob
Things are going better but i still have an error

Code: Select all
g++ -c -fno-common -g `wx-config --cflags`  -I.. -I../unxgen dialogs/basenotebook.cpp -o ../unxgen/rocview/bin/basenotebook.o
g++ -c -fno-common -g `wx-config --cflags`  -I.. -I../unxgen dialogs/aboxdlg.cpp -o ../unxgen/rocview/bin/aboxdlg.o
In file included from dialogs/aboxdlg.cpp:19:0:
/usr/include/wx-3.0/wx/filename.h: In static member function ‘static wxUniChar wxFileName::GetPathSeparator(wxPathFormat)’:
/usr/include/wx-3.0/wx/filename.h:473:43: error: ambiguous overload for ‘operator[]’ (operand types are ‘wxString’ and ‘unsigned int’)
         { return GetPathSeparators(format)[0u]; }
                                           ^
/usr/include/wx-3.0/wx/filename.h:473:43: note: candidate: operator[](const char*, long int) <built-in>
/usr/include/wx-3.0/wx/filename.h:473:43: note: candidate: operator[](const wchar_t*, long int) <built-in>
In file included from /usr/include/wx-3.0/wx/bitmap.h:18:0,
                 from dialogs/aboxdlggen.h:11,
                 from dialogs/aboxdlg.h:15,
                 from dialogs/aboxdlg.cpp:9:
/usr/include/wx-3.0/wx/string.h:1544:15: note: candidate: wxUniChar wxString::operator[](int) const
     wxUniChar operator[](int n) const
               ^~~~~~~~
/usr/include/wx-3.0/wx/string.h:1546:15: note: candidate: wxUniChar wxString::operator[](long int) const
     wxUniChar operator[](long n) const
               ^~~~~~~~
/usr/include/wx-3.0/wx/string.h:1548:15: note: candidate: wxUniChar wxString::operator[](size_t) const
     wxUniChar operator[](size_t n) const
               ^~~~~~~~
/usr/include/wx-3.0/wx/string.h:1556:18: note: candidate: wxUniCharRef wxString::operator[](int)
     wxUniCharRef operator[](int n)
                  ^~~~~~~~
/usr/include/wx-3.0/wx/string.h:1558:18: note: candidate: wxUniCharRef wxString::operator[](long int)
     wxUniCharRef operator[](long n)
                  ^~~~~~~~
/usr/include/wx-3.0/wx/string.h:1560:18: note: candidate: wxUniCharRef wxString::operator[](size_t)
     wxUniCharRef operator[](size_t n)
                  ^~~~~~~~
makefile:166 : la recette pour la cible « ../unxgen/rocview/bin/aboxdlg.o » a échouée
make[2]: *** [../unxgen/rocview/bin/aboxdlg.o] Erreur 1


Maybe should i compile xwidget too ?

Regards

Marc
Marc
Rocrail's fan
Linux Debian 9
ord3, Sprog, mgv systemHo, 2 & 3 rails system
pin88303
 

Re: compiling under debian 9

Postby rjversluis » 15.11.2017, 19:31

Hi Marc,

the error is in your local wxWidgets, not in the Rocrail sources.

Debian 9 should be no Problem because I already tested this.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: compiling under debian 9

Postby rjversluis » 15.11.2017, 20:50

If you are using make with many jobs:
Code: Select all
make -j4 fromtar

Try with only one or max. two jobs.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: compiling under debian 9

Postby pin88303 » 15.11.2017, 23:06

Hi Rob

I found my mistake ...

In fact, i remebered that i installed a rocrail deb package for ubuntu i386. So the dpkg command installed all the compatibles libraries :i386.
I removed this package and installed all the 64bits libxwidget libraries and everythings were compiling nicely.

Rocrail is running perfectly except with dcc232, but that's another trick.

Thanks a lot for the help

Marc
Marc
Rocrail's fan
Linux Debian 9
ord3, Sprog, mgv systemHo, 2 & 3 rails system
pin88303
 


Return to Building & Compiling