percona-xtrabackup-2.0.1 will not compile in Solaris 11 due to parameter mismatch with getpwuid_r and getgrgid_r functions

Bug #1033158 reported by Jaime Sicam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Triaged
Low
Unassigned
2.0
Won't Fix
Low
Unassigned
2.1
Triaged
Low
Unassigned
2.2
Triaged
Low
Unassigned
2.3
Triaged
Low
Unassigned

Bug Description

Error Snippet:
* * *
[ 11%] Building C object libarchive/CMakeFiles/archive_static.dir/archive_entry_copy_stat.c.o
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c: In function ‘lookup_uname_helper’:
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:201:11: error: too many arguments to function ‘getpwuid_r’
/usr/include/pwd.h:167:23: note: declared here
cc1: warnings being treated as errors
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:200:5: error: assignment makes integer from pointer without a cast
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c: In function ‘lookup_gname_helper’:
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:265:11: error: too many arguments to function ‘getgrgid_r’
/usr/include/grp.h:154:22: note: declared here
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:264:5: error: assignment makes integer from pointer without a cast
gmake[2]: *** [libarchive/CMakeFiles/archive.dir/archive_read_disk_set_standard_lookup.c.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[ 12%] Building C object libarchive/CMakeFiles/archive_static.dir/archive_entry_link_resolver.c.o
* * *

Workaround:
Add the following code right before the last line in src/libarchive/libarchive/archive_platform.h
#ifndef _POSIX_PTHREAD_SEMANTICS
#define _POSIX_PTHREAD_SEMANTICS
#endif

Jaime Sicam (jssicam)
tags: added: i25303
summary: percona-xtrabackup-2.0.1 will not compile in Solaris 11 due to
- parameter mismatch with getpwuid_r and getgtgid_r functions
+ parameter mismatch with getpwuid_r and getgrgid_r functions
Stewart Smith (stewart)
Changed in percona-xtrabackup:
status: New → Won't Fix
Stewart Smith (stewart)
Changed in percona-xtrabackup:
importance: Undecided → Low
status: Won't Fix → Triaged
Revision history for this message
Jaime Sicam (jssicam) wrote :

Here's a patch that updates CFLAGS under utils/build.sh so we don't need to change any code in libarchive.

Revision history for this message
Jaime Sicam (jssicam) wrote :

Here's an alternative patch using -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ as compiler flags
As mentioned by Raghu, these flags are platform independent.

Reference:
http://code.google.com/p/libarchive/issues/detail?id=61

Revision history for this message
Alexey Kopytov (akopytov) wrote :

See also #1088315. Perhaps a better solution would be to either merge libarchive from upstream, or get rid of the bundled libarchive completely.

Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 1033158] Re: percona-xtrabackup-2.0.1 will not compile in Solaris 11 due to parameter mismatch with getpwuid_r and getgrgid_r functions

Alexey Kopytov <email address hidden> writes:
> See also #1088315. Perhaps a better solution would be to either merge
> libarchive from upstream, or get rid of the bundled libarchive
> completely.

We'll need to build against upstream libarchive for getting into
Debian... so we should just get upstream to work for us.

--
Stewart Smith

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Hi Stewart,

On Tue, 26 Mar 2013 12:07:00 -0000, Stewart Smith wrote:
> Alexey Kopytov <email address hidden> writes:
>> See also #1088315. Perhaps a better solution would be to either merge
>> libarchive from upstream, or get rid of the bundled libarchive
>> completely.
>
> We'll need to build against upstream libarchive for getting into
> Debian... so we should just get upstream to work for us.
>

Yes, so depending on whether upstream provides some way to solve bug
#977998
, we will either remove bundled libarchive, or report the issue
upstream and just merge the current trunk to fix this bug as a
short-term solution.

tags: removed: i25303
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-82

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.