[LLVMdev] LLVM build is failed giving Path.inc:714: error: ‘unlink’ was not declared in this scope

Duncan Sands baldrick at free.fr
Wed Oct 26 11:10:59 PDT 2011


Hi, if you change unlink to ::unlink on that line, does it help?

Ciao, Duncan.

On 10/26/11 19:27, janarbek wrote:
> Does someone have a solution for this problem ?
> I am using gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) and I have tried
> several versions of LLVM including llvm 2.9 final. I am getting same error again
> and again.
>
> I have successfully build the llvm on another machine with gcc version of 4.3.
>
> Thanks in advance.
>
> make[1]: Entering directory
> `/home/janarbek/Work/llvm/RELEASE_29/final/trunk/lib/Support'
> llvm[1]: Compiling Path.cpp for Debug+Asserts build
> In file included from Path.cpp:299:
> Unix/Path.inc: In member function ‘bool llvm::sys::Path::eraseFromDisk(bool,
> std::string*) const’:
> Unix/Path.inc:716: error: ‘unlink’ was not declared in this scope
> make[1]: ***
> [/home/janarbek/Work/llvm/RELEASE_29/final/trunk/lib/Support/Debug+Asserts/Path.o]
> Error 1
> make[1]: Leaving directory
> `/home/janarbek/Work/llvm/RELEASE_29/final/trunk/lib/Support'
> make: *** [all] Error 1
>
>
>
> ===========================================
>
> Phone : 82-42-860-1838
> Fax : 82-42-860-6790
> Cell Phone: 82-10-7599-1981
> ===========================================
>
>
> --- On *Mon, 10/24/11, janarbek /<canarbekmatay at yahoo.com>/* wrote:
>
>
>     From: janarbek <canarbekmatay at yahoo.com>
>     Subject: Re: [LLVMdev] LLVM build is failed giving Path.inc:714: error:
>     ‘unlink’ was not declared in this scope
>     To: "Eli Friedman" <eli.friedman at gmail.com>
>     Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
>     Date: Monday, October 24, 2011, 5:54 PM
>
>     The patch does inseret unistd.h as below. However, I am still getting
>     exactly same error when I do make.if you have any suggestions please let me
>     know.
>
>     #if HAVE_UNISTD_H
>     #include <unistd.h>
>     #endif
>
>
>
>     ===========================================
>
>     Phone : 82-42-860-1838
>     Fax : 82-42-860-6790
>     Cell Phone: 82-10-7599-1981
>     ===========================================
>
>
>     --- On *Mon, 10/24/11, Eli Friedman /<eli.friedman at gmail.com>/* wrote:
>
>
>         From: Eli Friedman <eli.friedman at gmail.com>
>         Subject: Re: [LLVMdev] LLVM build is failed giving Path.inc:714: error:
>         ‘unlink’ was not declared in this scope
>         To: "janarbek" <canarbekmatay at yahoo.com>
>         Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
>         Date: Monday, October 24, 2011, 5:16 PM
>
>         On Mon, Oct 24, 2011 at 5:10 PM, janarbek <canarbekmatay at yahoo.com> wrote:
>          >
>          > Yes,
>          >
>          > I applied the patch on trunk version like below. It says patching
>         file. However, when I make, the build is still failing.
>          >
>          > janarbek at ubuntu:~/Work/llvm/llvm$ patch -p0 < unistd.txt
>          > patching file lib/Support/Unix/Path.inc
>
>         That means it was applied.
>
>         In that case, I have no idea how you could run into the error you're
>         seeing; unlink should be defined in unistd.h.
>
>         -Eli
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list