“-fpermissive” and “include ” dont work in linux c compiler

ShiraOzeri 07/30/2017. 1 answers, 44 views
android android c linux jenkins android-ndk android-ndk

I using Jenkins to Integretion a big project.

When i build the project in jenkins on windows meachine, the build successful.

But, when i build the same project in jenkins on linux meachine, the build failed.

I get a lot of error, like this:

 cc1: warning: command line option '-fpermissive' is valid for C++/ObjC++ but not for C

and problem with the name of the file:

  In file included from /var/lib/jenkins/workspace/mt-android-sdk-new/library/src/main/cpp/iprs_audio/iprs_audio_funcs.h:10:0,
                   from /var/lib/jenkins/workspace/mt-android-sdk-new/library/src/main/cpp/iprs_audio/iprs_audio_funcs.c:7:
  /var/lib/jenkins/workspace/mt-android-sdk-new/library/src/main/cpp/./iprs_audio/iprs_audio.h:15:40: fatal error: iprs_audio/iprs_audio_defs.h: No such file or directory
   #include <iprs_audio/iprs_audio_defs.h>

The name of the file is: Iprs_audio_defs.h (capital letter)

In windows the difference between letters doesnt matter, but in linux I got this error. I can't rename the files because this is a big project and my responsibility is just Jenkins

Any help?

Downvoter 07/30/2017
"In windows the difference between letters doesnt matter" The difference between which letters exactly? Also, what are your compilers on Windows and Linux, respectively?
Michael 07/30/2017
"I can't rename the files because this is a big project and my responsibility is just Jenkins" So tell the developers to fix it.
ShiraOzeri 07/30/2017
thanks a lot for the answer! @Downvoter I check this in my linux(centOS) and my compiler is: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11) .but in windows i dont know what is my compiler. i check answer for this but didnt found.. the project on Android Studio with a c file, but i also have visual studio 2015 on my coputer. Sorry for the confusion..
Jonathan Leffler 07/30/2017
Windows has a case-insensitive file system (so does macOS); Linux has a case-sensitive file system. You have to spell the path for the header accurately on Linux whereas you can be sloppy on Windows.

1 Answers

Dan Albert 08/10/2017.

I can't rename the files because this is a big project and my responsibility is just Jenkins

Unfortunately this is the only option. Linux is case-sensitive.

ShiraOzeri 08/30/2017
Thanks, are there any more differences? Maybe with NULL? I fixed the letters ... but it still runs only on Windows and not on Linux
Dan Albert 08/30/2017
NULL is not a file. C/C++ are already case sensitive. Case sensitivity of filenames is the difference.
ShiraOzeri 08/31/2017
But, even after I have corrected the case sensitive, the build falls. even that when I build the same project on Windows machine, it's successful. But with the Linux machine(centOS) failed.) .The code is compiled, then starts running the tests from the project and then falls. the error: Test failed to run to completion. Reason: 'Instrumentation run failed due to 'java.lang.IllegalArgumentException'
Dan Albert 08/31/2017
Sounds like a different issue, and one that isn't NDK related. You'll probably want to ask a new question for that issue, but a quick google search for that error finds: stackoverflow.com/questions/22085760/…

Related questions

Hot questions


Popular Tags