[LLVMdev] LLVM build is failed giving Path.inc:714: error: ‘unlink’ was not declared in this scope
Eli Friedman
eli.friedman at gmail.com
Mon Oct 24 16:36:15 PDT 2011
On Mon, Oct 24, 2011 at 4:27 PM, janarbek <canarbekmatay at yahoo.com> wrote:
>
> Hello All,
>
> I am getting following error on Ubuntu. My gcc is gcc version 4.4.5. Please let me know if you have any comments/suggestions.
>
> In file included from /home/janarbek/Work/llvm/llvm/lib/Support/Path.cpp:299:
> /home/janarbek/Work/llvm/llvm/lib/Support/Unix/Path.inc: In member function ‘bool llvm::sys::Path::eraseFromDisk(bool, std::string*) const’:
> /home/janarbek/Work/llvm/llvm/lib/Support/Unix/Path.inc:714: error: ‘unlink’ was not declared in this scope
> make[1]: *** [/home/janarbek/Work/llvm/llvm_obj/lib/Support/Release+Asserts/Path.o] Error 1
> make[1]: Leaving directory `/home/janarbek/Work/llvm/llvm_obj/lib/Support'
> make: *** [all] Error 1
> janarbek at ubuntu:~/Work/llvm/llvm_obj$ vi ../llvm/lib/Support/Path.cpp
Does the attached patch help?
Does this issue show up with 3.0 RC1? (http://llvm.org/pre-releases/3.0/)
-Eli
-------------- next part --------------
Index: lib/Support/Unix/Path.inc
===================================================================
--- lib/Support/Unix/Path.inc (revision 142876)
+++ lib/Support/Unix/Path.inc (working copy)
@@ -51,7 +51,9 @@
# include <ndir.h>
# endif
#endif
-
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
More information about the llvm-dev
mailing list