<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>Regarding the error below, I checked /usr/include/sys/unistd.h, and found out that unistd.h file contains only one line. So does llvm is using this unistd.h ? I suspect there is something wrong in my unistd.h.<br><br><br><div><font color="#00007f"></font> </div><br><br>--- On <b>Wed, 10/26/11, janarbek <i><canarbekmatay@yahoo.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: janarbek <canarbekmatay@yahoo.com><br>Subject: Re: [LLVMdev] LLVM build is failed giving Path.inc:714: error: ‘unlink’ was not declared in this scope<br>To: llvmdev@cs.uiuc.edu, "Duncan Sands" <baldrick@free.fr><br>Date: Wednesday, October 26, 2011, 1:10 PM<br><br><div id="yiv1791963944"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;"
valign="top"><br>Hi Duncan,<div><br></div><div>unlink is a C function, right ? why need a :: ? </div><div><br></div><div>Or is there a class ?<br><div><div><font color="#00007f"></font> </div><br>--- On <b>Wed, 10/26/11, Duncan Sands <i><baldrick@free.fr></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Duncan Sands <baldrick@free.fr><br>Subject: Re: [LLVMdev] LLVM build is failed giving Path.inc:714: error: ‘unlink’ was not declared in this scope<br>To: llvmdev@cs.uiuc.edu<br>Date: Wednesday, October 26, 2011, 11:10 AM<br><br><div class="yiv1791963944plainMail">Hi, if you change unlink to ::unlink on that line, does it help?<br><br>Ciao, Duncan.<br><br>On 10/26/11 19:27, janarbek wrote:<br>> Does someone have a solution for this problem ?<br>> I am using gcc version 4.4.5
(Ubuntu/Linaro 4.4.4-14ubuntu5) and I have tried<br>> several versions of LLVM including llvm 2.9 final. I am getting same error again<br>> and again.<br>><br>> I have successfully build the llvm on another machine with gcc version of 4.3.<br>><br>> Thanks in advance.<br>><br>> make[1]: Entering directory<br>> `/home/janarbek/Work/llvm/RELEASE_29/final/trunk/lib/Support'<br>> llvm[1]: Compiling Path.cpp for Debug+Asserts build<br>> In file included from Path.cpp:299:<br>> Unix/Path.inc: In member function ‘bool llvm::sys::Path::eraseFromDisk(bool,<br>> std::string*) const’:<br>> Unix/Path.inc:716: error: ‘unlink’ was not declared in this scope<br>> make[1]: ***<br>> [/home/janarbek/Work/llvm/RELEASE_29/final/trunk/lib/Support/Debug+Asserts/Path.o]<br>> Error 1<br>> make[1]: Leaving directory<br>> `/home/janarbek/Work/llvm/RELEASE_29/final/trunk/lib/Support'<br>> make: *** [all] Error
1<br>><br>><br>><br>> ===========================================<br>><br>> Phone : 82-42-860-1838<br>> Fax : 82-42-860-6790<br>> Cell Phone: 82-10-7599-1981<br>> ===========================================<br>><br>><br>> --- On *Mon, 10/24/11, janarbek /<<a rel="nofollow">canarbekmatay@yahoo.com</a>>/* wrote:<br>><br>><br>> From: janarbek <<a rel="nofollow">canarbekmatay@yahoo.com</a>><br>> Subject: Re: [LLVMdev] LLVM build is failed giving Path.inc:714: error:<br>> ‘unlink’ was not declared in this scope<br>> To: "Eli Friedman" <<a rel="nofollow">eli.friedman@gmail.com</a>><br>> Cc: "LLVM Developers Mailing List" <<a rel="nofollow">llvmdev@cs.uiuc.edu</a>><br>> Date: Monday, October 24, 2011, 5:54 PM<br>><br>>
The patch does inseret unistd.h as below. However, I am still getting<br>> exactly same error when I do make.if you have any suggestions please let me<br>> know.<br>><br>> #if HAVE_UNISTD_H<br>> #include <unistd.h><br>> #endif<br>><br>><br>><br>> ===========================================<br>><br>> Phone : 82-42-860-1838<br>> Fax :
82-42-860-6790<br>> Cell Phone: 82-10-7599-1981<br>> ===========================================<br>><br>><br>> --- On *Mon, 10/24/11, Eli Friedman /<<a rel="nofollow">eli.friedman@gmail.com</a>>/* wrote:<br>><br>><br>> From: Eli Friedman <<a rel="nofollow">eli.friedman@gmail.com</a>><br>> Subject: Re: [LLVMdev] LLVM build is failed giving Path.inc:714: error:<br>> ‘unlink’ was not declared in this scope<br>> To: "janarbek" <<a rel="nofollow">canarbekmatay@yahoo.com</a>><br>> Cc: "LLVM Developers Mailing List" <<a rel="nofollow">llvmdev@cs.uiuc.edu</a>><br>> Date: Monday, October 24, 2011,
5:16 PM<br>><br>> On Mon, Oct 24, 2011 at 5:10 PM, janarbek <<a rel="nofollow">canarbekmatay@yahoo.com</a>> wrote:<br>> ><br>> > Yes,<br>> ><br>> > I applied the patch on trunk version like below. It says patching<br>> file. However, when I make, the build is still failing.<br>>
><br>> > janarbek@ubuntu:~/Work/llvm/llvm$ patch -p0 < unistd.txt<br>> > patching file lib/Support/Unix/Path.inc<br>><br>> That means it was applied.<br>><br>> In that case, I have no idea how you could run into the error you're<br>> seeing; unlink should be defined in unistd.h.<br>><br>> -Eli<br>><br>><br>><br>> _______________________________________________<br>> LLVM Developers mailing list<br>> <a rel="nofollow">LLVMdev@cs.uiuc.edu</a> <a rel="nofollow" target="_blank" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>> <a rel="nofollow" target="_blank"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br><br>_______________________________________________<br>LLVM Developers mailing list<br><a rel="nofollow">LLVMdev@cs.uiuc.edu</a> <a rel="nofollow" target="_blank" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a rel="nofollow" target="_blank" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div></div></td></tr></tbody></table></div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>LLVM Developers mailing list<br><a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="/mc/compose?to=LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu"
target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></td></tr></table>