Problema com a instalação do torcs, erro com o openal

0

Eu estava tentando instalar torcs . No entanto, ao fazer o arquivo, estou com o seguinte problema

make[4]: Entering directory '/home/kenny/Local/torcs/src/libs/math'
make[4]: Nothing to be done for 'compil'.
make[4]: Leaving directory '/home/kenny/Local/torcs/src/libs/math'
make[4]: Entering directory 
'/home/kenny/Local/torcs/src/libs/musicplayer'
g++ -I/home/kenny/Local/torcs/export/include -I/home/kenny/Local/torcs 
-g -O2 -Wall -fPIC -fno-strict-aliasing -O2 -DUSE_RANDR_EXT - 
DGL_GLEXT_PROTOTYPES -Wall -fPIC -fno-strict-aliasing -O2 - 
DUSE_RANDR_EXT -DGL_GLEXT_PROTOTYPES  -D_SVID_SOURCE -D_BSD_SOURCE - 
DSHM -DHAVE_CONFIG_H  -c OpenALMusicPlayer.cpp
In file included from /usr/include/bits/libc-header-start.h:33,
             from /usr/include/stdio.h:27,
             from OpenALMusicPlayer.cpp:20:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and 
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
_DEFAULT_SOURCE"
    ^~~~~~~
OpenALMusicPlayer.cpp: In member function ‘virtual bool 
OpenALMusicPlayer::streamBuffer(ALuint)’:
OpenALMusicPlayer.cpp:164:22: error: invalid conversion from ‘char’ to 
‘const char*’ [-fpermissive]
 const char* error = '
make[4]: Entering directory '/home/kenny/Local/torcs/src/libs/math'
make[4]: Nothing to be done for 'compil'.
make[4]: Leaving directory '/home/kenny/Local/torcs/src/libs/math'
make[4]: Entering directory 
'/home/kenny/Local/torcs/src/libs/musicplayer'
g++ -I/home/kenny/Local/torcs/export/include -I/home/kenny/Local/torcs 
-g -O2 -Wall -fPIC -fno-strict-aliasing -O2 -DUSE_RANDR_EXT - 
DGL_GLEXT_PROTOTYPES -Wall -fPIC -fno-strict-aliasing -O2 - 
DUSE_RANDR_EXT -DGL_GLEXT_PROTOTYPES  -D_SVID_SOURCE -D_BSD_SOURCE - 
DSHM -DHAVE_CONFIG_H  -c OpenALMusicPlayer.cpp
In file included from /usr/include/bits/libc-header-start.h:33,
             from /usr/include/stdio.h:27,
             from OpenALMusicPlayer.cpp:20:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and 
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
_DEFAULT_SOURCE"
    ^~~~~~~
OpenALMusicPlayer.cpp: In member function ‘virtual bool 
OpenALMusicPlayer::streamBuffer(ALuint)’:
OpenALMusicPlayer.cpp:164:22: error: invalid conversion from ‘char’ to 
‘const char*’ [-fpermissive]
 const char* error = '%pre%';
                  ^~~~
 make[4]: *** [/home/kenny/Local/torcs/Make-default.mk:240: 
 OpenALMusicPlayer.o] Error 1
 make[4]: Leaving directory 
 '/home/kenny/Local/torcs/src/libs/musicplayer'
 make[3]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs] 
 Error 1
 make[3]: Leaving directory '/home/kenny/Local/torcs/src/libs'
 make[2]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs] 
 Error 1
 make[2]: Leaving directory '/home/kenny/Local/torcs/src'
 make[1]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs] 
 Error 1
 make[1]: Leaving directory '/home/kenny/Local/torcs'
 make: *** [Makefile:32: restart] Error 2
'; ^~~~ make[4]: *** [/home/kenny/Local/torcs/Make-default.mk:240: OpenALMusicPlayer.o] Error 1 make[4]: Leaving directory '/home/kenny/Local/torcs/src/libs/musicplayer' make[3]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs] Error 1 make[3]: Leaving directory '/home/kenny/Local/torcs/src/libs' make[2]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs] Error 1 make[2]: Leaving directory '/home/kenny/Local/torcs/src' make[1]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs] Error 1 make[1]: Leaving directory '/home/kenny/Local/torcs' make: *** [Makefile:32: restart] Error 2

Alguém pode sugerir como resolver o problema

    
por Raghu Yelugam 20.05.2018 / 03:45

1 resposta

1

De link , versão 1.3.7 + dfsg-4 de torcs no Repos Debian contém o patch que corrige o erro de compilação que você está experimentando, alterando o ponteiro na linha problemática para apontar para um nullptr .

-   const char* error = '
-   const char* error = '%pre%';
+   const char* error = nullptr;
'; + const char* error = nullptr;

O arquivo de patch completo está no link e na correção Introduz é plataforma neutra. Como alternativa, você pode compilar com -fpermissive como suas dicas de log.

    
por 20.05.2018 / 05:25

Tags