Closed Bug 1128029 Opened 10 years ago Closed 9 years ago

Compile with musl libc

Categories

(NSPR :: NSPR, defect, P2)

4.10.9
All
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: felix.janda, Assigned: felix.janda)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Proposed patch (obsolete) — Splinter Review
User Agent: Mozilla/5.0 (X11; U; Unix; en-US) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15 Surf/0.6 Steps to reproduce: Try to build with a musl libc based system http://musl-libc.org Actual results: Build failure because musl is linux but does not have getprotobyname_r.
OS: All → Linux
Attachment #8557288 - Flags: review?(ted)
Attachment #8557288 - Attachment is patch: true
Attachment #8557288 - Attachment mime type: text/x-patch → text/plain
Attachment #8557288 - Flags: review?(ted) → review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: wtc → felix.janda
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.10.9
Version: other → 4.10.9
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #1) > https://hg.mozilla.org/projects/nspr/rev/dc84f20b2ac6 This commit broke the SunOS continuous integration build. https://bot.nss-crypto.org:8011/builders/1-sunos-x32-DBG/builds/616/steps/shell/logs/stdio cc -o prnetdb.o -c -xstrconst -xs -g -KPIC -UNDEBUG -DDEBUG_not_whoami -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DDEBUG=1 -DXP_UNIX=1 -DSVR4=1 -DSYSV=1 -D__svr4=1 -D__svr4__=1 -DSOLARIS=1 -DHAVE_FCNTL_FILE_LOCKING=1 -Di386=1 -D_PR_HAVE_OFF64_T=1 -D_PR_INET6=1 -DHAVE_DLADDR=1 -DHAVE_LCHOWN=1 -DHAVE_SETPRIORITY=1 -DHAVE_STRERROR=1 -DHAVE_SYSCALL=1 -D_REENTRANT=1 -DHAVE_POINTER_LOCALTIME_R=1 -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_ -I/home/tinderbox/slavedir/1-sunos-x32-DBG/hg/nss/../dist/SunOS5.10_i86pc_DBG.OBJ/include -I../../../../pr/include -I../../../../pr/include/private ../../../../pr/src/misc/prnetdb.c "../../../../pr/src/misc/prnetdb.c", line 1165: identifier redeclared: getprotobyname_r current : static function(pointer to const char) returning pointer to struct protoent {pointer to char p_name, pointer to pointer to char p_aliases, int p_proto} previous: function(pointer to const char, pointer to struct protoent {pointer to char p_name, pointer to pointer to char p_aliases, int p_proto}, pointer to char, int) returning pointer to struct protoent {pointer to char p_name, pointer to pointer to char p_aliases, int p_proto} : "/usr/include/netdb.h", line 264 "../../../../pr/src/misc/prnetdb.c", line 1170: identifier redeclared: getprotobynumber_r current : static function(int) returning pointer to struct protoent {pointer to char p_name, pointer to pointer to char p_aliases, int p_proto} previous: function(int, pointer to struct protoent {pointer to char p_name, pointer to pointer to char p_aliases, int p_proto}, pointer to char, int) returning pointer to struct protoent {pointer to char p_name, pointer to pointer to char p_aliases, int p_proto} : "/usr/include/netdb.h", line 266 cc: acomp failed for ../../../../pr/src/misc/prnetdb.c
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch New patchSplinter Review
Sorry for the bad patch. Now a much simpler patch, which touches only linux. It makes the assumption that on linux only glibc 1 has the solaris getprotobyname_r prototype. (The previous patch did not work since on Solaris in order to use getprotobyname_r one needs -lnsl -lsocket in LDFLAGS.)
Attachment #8557288 - Attachment is obsolete: true
(In reply to Felix Janda from comment #4) > (The previous patch did not work since on Solaris in order to use > getprotobyname_r one needs -lnsl -lsocket in LDFLAGS.) I've meant to say that on Solaris the configure check did not succeed although Solaris has getprotobyname_r because it needs these LDFLAGS.
Attachment #8594933 - Flags: review?(ted)
Attachment #8594933 - Flags: review?(ted) → review+
This has missed 4.10.9 unfortunately.
Target Milestone: 4.10.9 → ---
Keywords: checkin-needed
Priority: -- → P2
Target Milestone: --- → 4.11
ping?
Does this need landing into NSPR? If so, can you land it?
Flags: needinfo?(ted)
Target Milestone: 4.11 → 4.12
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Flags: needinfo?(ted)
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: