servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

Build error in Ubuntu while running command make in terminal #128

Closed error404-personnotfound closed 6 years ago

error404-personnotfound commented 6 years ago

$ make SERVALD CC jni_common.c SERVALD CC jni_commandline.c SERVALD CC jni_instance.c SERVALD CC jni_server.c SERVALD CC sqlite-amalgamation-3140200/sqlite3.c sqlite-amalgamation-3140200/sqlite3.c:1:9: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]

pragma GCC diagnostic ignored "-Wimplicit-fallthrough"

     ^

cc1: all warnings being treated as errors Makefile:254: recipe for target 'objs_servald/sqlite3.o' failed make: *** [objs_servald/sqlite3.o] Error 1

how to resolve this error

AgentConDier commented 6 years ago

@kanishkapillai same here, I commented out the line that was throwing the error. Pretty sure that is not the correct approach, but it seems to work. I'd guess this is caused by an outdated version of gcc or something.

lakeman commented 6 years ago

For a quick fix, you should be able to comment out that line.

Looks like Andrew added that pragma to turn off a diagnostic in gcc v7. We probably need to change this to a macro, set by some form of configure test. Or see if upstream sqlite has tidied up the code.

AgentConDier commented 6 years ago

Thanks for the quick reply! I got errors on the following tests: 118 [ERROR] (msp) Forward TCP connections to a remote server: in setup_netcat6: nc6(1) command is not present 119 [ERROR] (msp) Tunnel a tcp connection: in setup_netcat6: nc6(1) command is not present 122 [ERROR] (msp) Terminate a connection mid stream: in setup_netcat6: nc6(1) command is not present plus all the restful api tests with the same error

Not sure if related

lakeman commented 6 years ago

Each test writes a log file into testlog/all/... The three msp tests are likely to be related to the version of nc, which we might be mis-detecting At a guess, I'd say the restful tests are complaining about curl.

On Thu, Apr 5, 2018 at 12:26 AM, AgentConDier notifications@github.com wrote:

Thanks for the quick reply! I got errors on the following tests: 118 [ERROR] (msp) Forward TCP connections to a remote server 119 [ERROR] (msp) Tunnel a tcp connection 122 [ERROR] (msp) Terminate a connection mid stream 284 [ERROR] (keyringrestful) REST API list keyring identities as JSON 285 [ERROR] (keyringrestful) REST API list keyring identities as JSON, with PIN 286 [ERROR] (keyringrestful) REST API get single keyring identity as JSON 287 [ERROR] (keyringrestful) REST API add keyring identity 288 [ERROR] (keyringrestful) REST API add keyring identity with PIN 289 [ERROR] (keyringrestful) REST API remove keyring identity 290 [ERROR] (keyringrestful) REST API set keyring identity DID and name 291 [ERROR] (keyringrestful) REST API set keyring identity DID and name with PIN 292 [ERROR] (keyringrestful) REST API lock and unlock PIN-protected identities 293 [ERROR] (routerestful) REST API missing Basic Authentication credentials 294 [ERROR] (routerestful) REST API incorrect Basic Authentication credentials 295 [ERROR] (routerestful) REST API list entire routing table 296 [ERROR] (rhizomerestful) REST API missing Basic Authentication credentials 297 [ERROR] (rhizomerestful) REST API incorrect Basic Authentication credentials 298 [ERROR] (rhizomerestful) REST API allow local cross site requests, and deny remote ones 299 [ERROR] (rhizomerestful) REST API list 100 Rhizome bundles as JSON 300 [ERROR] (rhizomerestful) REST API list Rhizome bundles since token as JSON 301 [ERROR] (rhizomerestful) REST API fetch Rhizome manifest 302 [ERROR] (rhizomerestful) REST API fetch non-existent Rhizome manifest 303 [ERROR] (rhizomerestful) REST API fetch Rhizome raw payload 304 [ERROR] (rhizomerestful) REST API fetch Rhizome raw payload for non-existent manifest 305 [ERROR] (rhizomerestful) REST API fetch non-existent Rhizome raw payload 306 [ERROR] (rhizomerestful) REST API fetch Rhizome decrypted payload 307 [ERROR] (rhizomerestful) REST API cannot fetch foreign Rhizome decrypted payload 308 [ERROR] (rhizomerestful) REST API fetch Rhizome decrypted payload for non-existent manifest 309 [ERROR] (rhizomerestful) REST API fetch non-existent Rhizome decrypted payload 310 [ERROR] (rhizomerestful) REST API insert new Rhizome bundles 311 [ERROR] (rhizomerestful) REST API insert of various payload lengths 312 [ERROR] (rhizomerestful) REST API update anonymous Rhizome bundle 313 [ERROR] (rhizomerestful) REST API insert and update anonymous Rhizome bundle with passphrase secret 314 [ERROR] (rhizomerestful) REST API insert and update Rhizome bundle with passphrase secret 315 [ERROR] (rhizomerestful) REST API insert empty Rhizome bundle 316 [ERROR] (rhizomerestful) REST API update Rhizome bundle to empty 317 [ERROR] (rhizomerestful) REST API insert 50 MiB Rhizome bundle 318 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, missing 'manifest' form part 319 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, 'manifest' form part overflow 320 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, incorrect 'manifest' content type 321 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, incorrect 'manifest' content format 322 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, duplicate 'manifest' form part 323 [ERROR] (rhizomerestful) REST API insert Rhizome bundle does not accept journals 324 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, missing 'payload' form part 325 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, duplicate 'payload' form part 326 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, 'payload' form part before 'manifest' 327 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, unsupported form part 328 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, incorrect filesize 329 [ERROR] (rhizomerestful) REST API insert Rhizome bundle, incorrect filehash 330 [ERROR] (rhizomerestful) REST API Rhizome import 331 [ERROR] (rhizomerestful) REST API Rhizome import 50 MiB 332 [ERROR] (rhizomerestful) REST API Rhizome import parameters must match manifest 333 [ERROR] (rhizomerestful) REST API Rhizome journal create and append 334 [ERROR] (rhizomerestful) REST API Rhizome journal append with shared payload 335 [ERROR] (rhizomerestful) REST API Rhizome cannot append to non-journal 336 [ERROR] (meshmsrestful) REST API missing Basic Authentication credentials 337 [ERROR] (meshmsrestful) REST API incorrect Basic Authentication credentials 338 [ERROR] (meshmsrestful) REST API talk to yourself 339 [ERROR] (meshmsrestful) REST API list MeshMS conversations as JSON 340 [ERROR] (meshmsrestful) REST API list MeshMS messages in one conversation as JSON 341 [ERROR] (meshmsrestful) REST API list MeshMS messages from unknown identity 342 [ERROR] (meshmsrestful) REST API list MeshMS since token with no messages 343 [ERROR] (meshmsrestful) REST API list MeshMS messages in one conversation since token as JSON 344 [ERROR] (meshmsrestful) REST API list newly arriving MeshMS messages in one conversation as JSON 345 [ERROR] (meshmsrestful) REST API send MeshMS message 346 [ERROR] (meshmsrestful) REST API MeshMS send missing 'message' form part 347 [ERROR] (meshmsrestful) REST API MeshMS send duplicate 'message' form parts 348 [ERROR] (meshmsrestful) REST API MeshMS send 'message' form part missing Content-Type 349 [ERROR] (meshmsrestful) REST API MeshMS send 'message' form part unsupported Content-Type 350 [ERROR] (meshmsrestful) REST API MeshMS send 'message' form part missing charset 351 [ERROR] (meshmsrestful) REST API MeshMS send 'message' form part unsupported charset 352 [ERROR] (meshmsrestful) REST API MeshMS send from unknown identity 353 [ERROR] (meshmsrestful) REST API MeshMS mark all conversations read 354 [ERROR] (meshmsrestful) REST API MeshMS rejects unwanted content in POST request 355 [ERROR] (meshmsrestful) REST API MeshMS mark all conversations read 356 [ERROR] (meshmsrestful) REST API MeshMS mark a message as read 357 [ERROR] (meshmsrestful) REST API send lots of MeshMS messages 358 [ERROR] (meshmsrestful) REST API MeshMS UTF-8 emoticons 359 [ERROR] (meshmbrestful) REST API missing MeshMB Basic Authentication credentials 360 [ERROR] (meshmbrestful) REST API incorrect MeshMB Basic Authentication credentials 361 [ERROR] (meshmbrestful) REST API MeshMB send a broadcast message 362 [ERROR] (meshmbrestful) REST API MeshMB list of all messages 363 [ERROR] (meshmbrestful) REST API MeshMB follow a feed 364 [ERROR] (meshmbrestful) REST API MeshMB list subscribed feeds 365 [ERROR] (meshmbrestful) REST API MeshMB activity with no content 366 [ERROR] (meshmbrestful) REST API MeshMB thread incoming activity 367 [ERROR] (meshmbrestful) REST API MeshMB newsince incoming activity Not sure if related

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/servalproject/serval-dna/issues/128#issuecomment-378630299, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkD3m8n5PpKOq91noDVes1O_jw8YcCbks5tlN82gaJpZM4QPK-u .

quixotique commented 6 years ago

I will fix the #pragma line in sqlite3.c to be based on the build configuration. I will change the configure.in script to detect whether that warning option is supported by the compiler.

quixotique commented 6 years ago

It looks like you have not installed the netcat6 package (to get the nc6 utility) or the curl package (to get the curl utility).

If you read the test logs, you will see the cause of the errors.

The doc/Testing.md document describes how to access the test logs. I suggest you read that document before proceeding any further.

AgentConDier commented 6 years ago

I did that. REST Api complained about jq netcat seems to be installed tho: AgentConDier@pine64:~$ netcat This is nc from the netcat-openbsd package. An alternative nc is available in the netcat-traditional package. usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length] [-P proxy_username] [-p source_port] [-q seconds] [-s source] [-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [destination] [port] AgentConDier@pine64:~$ curl curl: try 'curl --help' or 'curl --manual' for more information I've installed jq, rerunning tests now. But what is the difference between netcat and netcat6? E: Unable to locate package netcat6

quixotique commented 6 years ago

I presume you are using a version of Ubuntu later than 14.04. It would have been more helpful if you gave that information in the original bug comment.

The netcat6 package is no longer provided by Ubuntu because the standard OpenBSD nc utility now supports IPv6. I have not recently reviewed the Serval test framework's detection/support of the OpenBSD netcat utililty, but I should, because netcat6 it is now deprecated.

AgentConDier commented 6 years ago

Yes, I'm on 16.04 Apart from the netcat errors I get 2 FAILs on the tests now: 317.RhizomeInsertLarge 331.RhizomeImportLarge Not sure if related, but I only have 500M of RAM

quixotique commented 6 years ago

7ab9bc0 replaces nc6 with nc.openbsd, so no more dependency on the discontinued netcat6 package.