Ticket #3803 (closed Bug report: fixed)

Opened 6 years ago

Last modified 10 months ago

FileZilla 3.1.3 fails to build on Solaris(Nevada b98)

Reported by: alfred Owned by: codesquid
Priority: normal Component: FileZilla Client
Keywords: Cc:
Operating system type: Other Operating system version:

Description

FileZilla 3.1.3 fails to build on Solaris. The error messages are as below:
1. pkgbuild: /usr/bin/CC -DHAVE_CONFIG_H -I. -I../../src/include -I./../include -I/usr/include -I/usr/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWXGTK -I/usr/include -I/usr/include/idn -c -o libengine_a-directorylistingparser.o test -f 'directorylistingparser.cpp' || echo './'directorylistingparser.cpp
pkgbuild: "../../src/include/engineprivate.h", line 66: Warning: extra ";" ignored.
pkgbuild: "directorylisting.cpp", line 412: Error: Could not find a match for std::multimap<wxString, unsigned, std::less<wxString>, std::allocator<std::pair<const wxString, unsigned>>>::insert(std::pair<wxString, unsigned>) needed in CDirectoryListing::FindFile_CmpCase(const wxString&) const.
pkgbuild: "directorylisting.cpp", line 442: Error: Could not find a match for std::multimap<wxString, unsigned, std::less<wxString>, std::allocator<std::pair<const wxString, unsigned>>>::insert(std::pair<wxString, unsigned>) needed in CDirectoryListing::FindFile_CmpNoCase(wxString) const.
pkgbuild: 2 Error(s) and 1 Warning(s) detected.

2. pkgbuild: "local_filesys.cpp", line 158: Warning: dir hides CLocalFileSystem::dir.
pkgbuild: "local_filesys.cpp", line 168: Warning: file hides CLocalFileSystem::file.
pkgbuild: "local_filesys.cpp", line 366: Error: NAME_MAX is not defined.
pkgbuild: "local_filesys.cpp", line 439: Error: DT_LNK is not defined.
pkgbuild: "local_filesys.cpp", line 439: Error: d_type is not a member of dirent.
pkgbuild: "local_filesys.cpp", line 446: Error: DT_DIR is not defined.
pkgbuild: "local_filesys.cpp", line 446: Error: d_type is not a member of dirent.
pkgbuild: "local_filesys.cpp", line 517: Error: DT_LNK is not defined.
pkgbuild: "local_filesys.cpp", line 517: Error: d_type is not a member of dirent.
pkgbuild: "local_filesys.cpp", line 528: Error: DT_DIR is not defined.
pkgbuild: "local_filesys.cpp", line 528: Error: d_type is not a member of dirent.
pkgbuild: 9 Error(s) and 3 Warning(s) detected.

Attachments

filezilla-02-multimap-const.diff Download (0.8 KB) - added by alfred 6 years ago.
The patch to fix the first error
filezilla-03-dirent-to-stat.diff Download (1.6 KB) - added by alfred 6 years ago.
The patch to fix the second error--updated

Change History

Changed 6 years ago by alfred

The patch to fix the first error

Changed 6 years ago by alfred

Forgot to mentioned, I build FileZilla 3.1.3 on Solaris with Sun Studio 12:
bash-3.2$ cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-06 2008/06/24

The struct dirent definition on Solaris is as below. Should be different with the one on Linux and cause the build failure.

typedef struct dirent {

ino_t d_ino; /* "inode number" of entry */
off_t d_off; /* offset of disk directory entry */
unsigned short d_reclen; /* length of this record */
char d_name[1]; /* name of file */

} dirent_t;

Changed 6 years ago by codesquid

  • owner set to codesquid
  • status changed from new to accepted

Unfortunately I cannot apply the second patch in its current form. The additional stat is unneeded on some systems. It can cause significant delays on mounted network resources, depending on mount options.

Some #ifdefery or a configure check is needed instead.

Changed 6 years ago by alfred

The patch to fix the second error--updated

Changed 6 years ago by codesquid

I've committed some changes that check if _DIRENT_HAVE_D_TYPE is defined. If it is, d_type is used, else GetFileInfo gets used.

Changed 6 years ago by codesquid

  • status changed from accepted to closed
  • resolution set to fixed

Changed 6 years ago by alfred

It's so quick. thanks, guys.

Note: See TracTickets for help on using tickets.