Clang error no such file or directory

Having a problem when building with xcodebuild. My project/app builds fine with the Xcode - gui. It simply isn't finding/building the libcryptopp library which is part of the build process. The er...

My xCode info is:

image

I faced similar errors during xcode building projects (native swift, flutter, react native, native script) in which I got error messages related to clang compilar. Errors like:

  • clang-4.0: error: no such file or directory: ‘/Users/xxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxxxxxxx/Index/Data Store’
  • clang-4.0: error: cannot specify -o when generating multiple output files
  • others

Despite of errors related with DerivedData for native apps can be fixed by deleting the directory and, eventually, restart xCode and even restart the machine… in this case, you will see that after deleting the directory and start building process again, the error comes back.

Then, is the moment of checking the clang installation by running clang --version. The normal output will be something like:

image

as you can see the InstalledDir is incorrect for xCode. In my case, some days ago I needed to install Anaconda app (R, Python, etc) and, now, I remember that I had to install some dependencies and one of them was clang and its installation was altered.
To fix this problem (in my case that I will not need anaconda any more): (edited)

1.- Delete anaconda and all its dependencies (I recommend to use App Cleaner).
2.- Re-install xCode

After reinstalling xCode, if you type again clang --version, you’ll get this:

image

More info at: https://github.com/flutter/flutter/issues/32457#issuecomment-496161092

Hopefully, this info helps some else.

Best

I have added flags in compile sources for janrain integration in my app.

When i m trying to run app or archiving build on that time i faced this error.

I already added that file to correct build path and its already contain within project.

Here i attached snaps of that error :

enter image description here

Can anyone please help me to solved this? Thanks in Advance.. :)

asked May 18, 2016 at 3:53

Pavan Gandhi's user avatar

Pavan GandhiPavan Gandhi

1,7091 gold badge22 silver badges36 bronze badges

7

Go in your target compile sources and check its may be that you used the filename as compiler flag in ARC or you may used wrong compiler flags.

i hope its worked.

answered Jul 14, 2016 at 3:53

Lotus Shah's user avatar

Lotus ShahLotus Shah

4954 silver badges13 bronze badges

just check your compile sources its may that you give wrong flag for ARC or your file is not available with testtareget.

answered Jun 1, 2016 at 9:43

Just check your flags which u set in compile sources. Either its repeated or either its wrongly used.

answered Jun 4, 2016 at 8:55

Mahesh's user avatar

MaheshMahesh

3551 gold badge6 silver badges16 bronze badges

This problem raised because of i am passing this class name to set in compile sources flag instead of -fno-objc-arc.

answered May 18, 2016 at 10:18

Pavan Gandhi's user avatar

Pavan GandhiPavan Gandhi

1,7091 gold badge22 silver badges36 bronze badges

Check with your existing flags in your compile sources its may be that you used the filename as compiler flag.

answered May 20, 2016 at 5:00

0

Clean and Build your Project and then try again.

answered May 20, 2016 at 4:16

make sure you in the Other Linker Flags in case you use ‘$(inherited)’, add only $(inherited) without the 2 »

answered Jan 2, 2017 at 9:17

Zsolt's user avatar

ZsoltZsolt

3,5803 gold badges31 silver badges47 bronze badges

None of the possible solutions above worked in my scenario.

For a Swift project with Objective-C file(s) included make sure they are not added to the Build Phases -> Compile Sources section of your project’s target.

I had a Swift project where after I dragged Objective-C files into the project the implementation files were added to the Build Phases -> Compile Sources section. Once I removed the Objective-C implementation files from the Compile Sources section my project worked happily once again.

This was using Xcode version 8.3 (8E162).

answered Jun 29, 2017 at 15:40

Audible's user avatar

AudibleAudible

2253 silver badges10 bronze badges

@kasru

  • Setup clang 6.0 for Windows
  • Replase «5.0» to «6.0.0» in file

Compile error:
clang-cl.exe : error : no such file or directory: ‘/permissive-‘

@arves100

This files were tested for clang 5.0, I wil look for clang 6

@CuteLasty

That is visual studio 2017 option.
You can set project property / C/C++ / Language / Conformance mode to «No» to disable it.

@KeyC0de

Unfortunately the error persists: no such file or directory: '/JMC'

@PaTiToMaSteR

Because /JMC is the new feature of VS2017, which you can deactivate in C/C++ section, writing in the search box «/JMC», and assign it to No.

Hope this helps!

arves100

added a commit
that referenced
this issue

Dec 29, 2018

@arves100

@arves100

Should I keep this issue open, or the permissive error is fixed?

@PaTiToMaSteR

As far I try still an issue, unless there is a new version that worked the problem

🤔

On 29 Dec 2018, at 13:40, Arves100 ***@***.***> wrote:

Should I keep this issue open, or the permissive error is fixed?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@arves100

Uhmmm you could try with the last version and tell me clang+vs version so I
can try reproduce the issue.

Il giorno lun 31 dic 2018, 11:23 PaTiTo MaSteR <notifications@github.com>
ha scritto:

As far I try still an issue, unless there is a new version that worked the
problem

🤔

> On 29 Dec 2018, at 13:40, Arves100 ***@***.***> wrote:
>
> Should I keep this issue open, or the permissive error is fixed?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEn4E0nDt9oCYO3nxj1dvtDL6NoXBQXQks5u-eWJgaJpZM4TLjbS>
.

I am trying to install UDUNITS-2 package for the graphical visual browser: ncview.

Can anyone help me understand the following error message:

clang: error: no such file or directory: '_REENTRANT'

A similar question was given here —> Xcode 7.2 — clang: error: no such file or directory:

My ./configure output:

brendan-darrer:Downloads brendandarrer$ cd src/
brendan-darrer:src brendandarrer$ ls
COPYRIGHT   INSTALL     NOTEBOOK    README      VERSION     admin       configure.in    perl        udunits
CUSTOMIZE   Makefile.in ORIGIN      RELEASE_NOTES   aclocal.m4  configure   lib     port
brendan-darrer:src brendandarrer$ ./configure
creating cache ./config.cache
configure: warning: reading configuration customizations
checking type of operating system... darwin
checking for c89... c89
checking for dependency generation mechanism... c89 -M
checking how to run the C preprocessor... c89 -E
checking the C preprocessor... works
checking for C const... yes
checking for C volatile... yes
checking for C signed... yes
checking for C function prototypes... yes
checking for standard C variadic functions... yes
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking for standard C string generation... yes
checking for standard C token pasting... yes
checking C void pointer... yes
checking type of machine... x86_64
checking for ar... ar
checking for tar flags... -chof
checking for ranlib... ranlib
checking binary distribution directory... /home/ftp/pub/binary/x86_64-darwin
checking the installation prefix... /Users/brendandarrer/Downloads
checking the installation exec-prefix... /Users/brendandarrer/Downloads/bin
checking for neqn... neqn
checking for tbl... tbl
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <stddef.h> for typedef size_t... declared
checking for ar... (cached) ar
checking for float.h... yes
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <stdlib.h> for typedef size_t... declared
checking for atexit... yes
checking C header file <stdlib.h> for function atexit()... declared
checking for getenv... yes
checking C header file <stdlib.h> for function getenv()... declared
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <string.h> for typedef size_t... declared
checking for strerror... yes
checking C header file <string.h> for function strerror()... declared
checking for strstr... yes
checking C header file <string.h> for function strstr()... declared
checking for memmove... yes
checking C header file <string.h> for function memmove()... declared
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <time.h> for typedef time_t... declared
checking C header file <time.h> for typedef size_t... declared
checking for difftime... yes
checking C header file <time.h> for function difftime()... declared
checking for strftime... yes
checking C header file <time.h> for function strftime()... declared
checking for perl... perl
checking for type of perl executable to create... dynamic
checking for position-independent compilation flags... ''
updating cache ./config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating udunits/Makefile
creating perl/Makefile.PL
creating port/master.mk
creating port/Makefile
creating port/misc/Makefile
creating port/fortc/Makefile
creating port/misc/udposix.h
creating port/misc/stdarg.h
creating port/misc/stddef.h
creating port/misc/stdlib.h
creating port/misc/string.h
creating port/misc/time.h
expanding `include's in file `Makefile'
expanding `include's in file `lib/Makefile'
expanding `include's in file `udunits/Makefile'
expanding `include's in file `perl/Makefile.PL'
expanding `include's in file `port/master.mk'
expanding `include's in file `port/Makefile'
expanding `include's in file `port/misc/Makefile'
expanding `include's in file `port/fortc/Makefile'
brendan-darrer:src brendandarrer$ make
Makefile:279: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:276: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:384: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:381: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:418: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:415: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:448: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:445: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:503: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:491: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:541: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:538: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'

making `all' in directory /Users/brendandarrer/Downloads/src/port

Makefile:263: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:260: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:368: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:365: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:402: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:399: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:432: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:429: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:487: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:475: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:525: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:522: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'
Makefile:263: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:260: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:368: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:365: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:402: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:399: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:432: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:429: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:487: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:475: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:525: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:522: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'

making `all' in directory /Users/brendandarrer/Downloads/src/port/misc

Makefile:285: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:282: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:390: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:387: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:424: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:421: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:454: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:451: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:509: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:497: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:547: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:544: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'
c89 -c -g -I.  -D_REENTRANT  uddummy.c
clang: error: no such file or directory: '_REENTRANT'
make[3]: *** [uddummy.o] Error 1
make[2]: *** [misc/all] Error 1
make[1]: *** [subdirs/all] Error 2
make: *** [port/all] Error 1
brendan-darrer:src brendandarrer$ 

asked Jan 25, 2019 at 12:53

Brendan Darrer's user avatar

Brendan DarrerBrendan Darrer

1511 gold badge2 silver badges11 bronze badges

The problem was solved by implementing the code:

brew install -s ncview

Using homebrew, that installed the whole ncview package automatically for Apple Mac, including it’s dependencies.

See:
katbormann commented on 13 Jul 2016 on GitHub post.

answered Feb 5, 2019 at 15:59

Brendan Darrer's user avatar

Brendan DarrerBrendan Darrer

1511 gold badge2 silver badges11 bronze badges

  1. 24th March 2021, 15:42


    #1

    Default Trouble building for android platform(clang ++ no such file or directory error:)

    am trying to build an app for Windows and Android platform. Windows build is working fine but when I build it for android it gives the following error

    error: no such file or directory: ‘@buildMyAppobject_script.MyAppBuildPAthbinand roid_armeabi-v7alibMyApp_armeabi-v7a.so.Armeabi-v7a’
    clang++: error: no such file or directory:
    make: *** [Makefile:111: MyAppBuildPAthbinandroid_armeabi-v7alibTerracad_armeabi-v7a.so] Error 1

    This is my .pro file for the app.

    //———————————————————————————-

    TEMPLATE=app

    android{
    TARGET= MyAppName
    DESTDIR = $${My_ProjDir}/bin/$${configName}
    PRJ_DESTDIR = «»
    OBJECTS_DIR = $${PRJ_DESTDIR}build/$$TARGET
    MOC_DIR = $${PRJ_DESTDIR}build/$$TARGET
    UI_DIR = $${PRJ_DESTDIR}build/$$TARGET

    DEFINES += ANDROID
    DEFINES += ANDROID_NDK_NATIVE
    DEFINES += ANDROID_GOOGLE

    }else{
    DESTDIR = $${My_ProjDir}/exe/$${configName}
    PRJ_DESTDIR = «»
    OBJECTS_DIR = $${PRJ_DESTDIR}build/$$TARGET
    MOC_DIR = $${PRJ_DESTDIR}build/$$TARGET
    UI_DIR = $${PRJ_DESTDIR}build/$$TARGET
    }

    win32:LIBS += -L$${My_ProjDir}/lib/$${configName}
    !win32:LIBS += -L$${My_ProjDir}/bin/$${configName}
    !win32:LIBS += -L$${My_ProjDir}/lib/$${configName}

    INCLUDEPATH += $${My_ProjDir}/ include directories

    HEADERS += some heaader files

    SOURCES += some source files

    FORMS += some form files

    QT+= core gui widgets

    # Third party SDK libraries
    android{
    LIBS += linked almost 25-26 libs in this section
    }else{
    LIBS += windows specific libraries
    }

    android: include(C:/Users/10313/AppData/Local/Android/Sdk/android_openssl/openssl.pri)
    #end of .pro file
    #———————————————————————————

    What am I doing wrong? I am new to Qt framework. Can someone point me towards the right direction. Any kind of help will be highly appreciated.


  2. 26th March 2021, 23:49


    #2

    Default Re: Trouble building for android platform(clang ++ no such file or directory error:)

    Quote Originally Posted by Pratik_Patil
    View Post

    am trying to build an app for Windows and Android platform. Windows build is working fine but when I build it for android it gives the following error

    error: no such file or directory: ‘@buildMyAppobject_script.MyAppBuildPAthbinand roid_armeabi-v7alibMyApp_armeabi-v7a.so.Armeabi-v7a’
    clang++: error: no such file or directory:
    make: *** [Makefile:111: MyAppBuildPAthbinandroid_armeabi-v7alibTerracad_armeabi-v7a.so] Error 1

    What am I doing wrong? I am new to Qt framework. Can someone point me towards the right direction. Any kind of help will be highly appreciated.

    You are missing a library that looks like something called «Terracad». Is this in the list of libraries (LIBS) you did not include in your posted PRO file? Is it installed?

    Did you perhaps mean Terracard?


Понравилась статья? Поделить с друзьями:
  • Clamav ошибка обновления
  • Clamav scanning error 8 init error
  • Clack ошибка 103
  • Clack ошибка 102
  • Clack ошибка 101