Re: Compiling lftp on Solaris with Sun Studio
Yann Rouillard <[email protected]> Tue, 22 Aug 2006 20:08:46 +0200
| Newsgroups | gmane.network.lftp.devel |
|---|---|
| Message-ID | <[email protected]> |
Alexander V. Lukyanov a écrit : > On Sun, Aug 20, 2006 at 01:25:45AM +0200, Yann Rouillard wrote: >> I maintain the lftp package for the blastwave project ( >> http://www.blastwave.org/ ) and I had some issues with lftp 3.5.4 under >> Solaris with Sun CC. >> >> I attached the patchs I applied to be able to solve the problems: > > Thanks for the patch, but I chose another solution, see below. > >> - I had a problem with the bool type, there seems to be an error in the >> stdbool_.h file when the compiler does support bool, moreover the >> included stdbool.h is not in the default include path so it triggers an >> error on Solaris 5.8 where this file doesn't exist. > > I changed configure to link stdbool_.h to include directory when system one > is missing. You shouldn't link to stdbool_.h but to stdbool.h stdbool_.h is just a template file, the Makefile will create later the real stdbool.h. But if you try to link to stdbool.h at configure time, since stdbool.h doesn't yet exist, you have the following error: config.status: linking ./lib/stdbool.h to include/stdbool.h config.status: error: ./lib/stdbool.h: file not found >> - I had a segfault when I did a 'ls' with the sftp protocol, it turns >> out the MakeRef macro didn't work as expected >> Makeref(session->MakeDirList(v)) was transformed by CC in >> (_MakeRef((session->MakeDirList(v))),(session->MakeDirList(v))) which >> created 2 SFtpDirList instead of one, both sharing the same session value. > > I decided to drop the macros and leave the templates. Screw the broken compilers. Well CC supports templates so that's fine. Yann