Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#135] Fails to build on Linux PowerPC

Date:
2015-07-23 03:13
Priority:
3
State:
Closed
Submitted by:
James McCoy (jamessan)
Assigned to:
John Reppy (jhr)
Machine Architecture:
PPC
Operating System:
Linux
Component:
Other
Resolution:
Fixed
Severity:
Major
OS Version:
Debian sid
SML/NJ Version:
110.77
Keywords:
URL:
https://buildd.debian.org/status/fetch.php?pkg=smlnj&arch=powerpc&ver=110.78-1&stamp=1437540067
Transcript (of reproduction):
make[6]: Leaving directory '/«PKGBUILDDIR»/build-dir/bootstrap/base/runtime/c-libs/posix-os' echo "v-ppc-linux" > v-ppc-linux gcc -ansi -O2 -DHOST_PPC -DTARGET_PPC -DOPSYS_UNIX -DOPSYS_LINUX -D_POSIX_SOURCE -D_BSD_SOURCE -DGNU_ASSEMBLER -I../../objs -I../../include -I.. -c posix-os-lib.c gcc -ansi -O2 -DHOST_PPC -DTARGET_PPC -DOPSYS_UNIX -DOPSYS_LINUX -D_POSIX_SOURCE -D_BSD_SOURCE -DGNU_ASSEMBLER -I../../objs -I../../include -I.. -c poll.c gcc -ansi -O2 -DHOST_PPC -DTARGET_PPC -DOPSYS_UNIX -DOPSYS_LINUX -D_POSIX_SOURCE -D_BSD_SOURCE -DGNU_ASSEMBLER -I../../objs -I../../include -I.. -c tmpname.c tmpname.c: In function '_ml_OS_tmpname': tmpname.c:41:3: error: expected expression before '/' token // for old systems ^ tmpname.c:44:13: error: 'buf' undeclared (first use in this function) tmpnam (buf); ^ tmpname.c:44:13: note: each undeclared identifier is reported only once for each function it appears in make[5]: *** [tmpname.o] Error 1 makefile:37: recipe for target 'tmpname.o' failed make[5]: Leaving directory '/«PKGBUILDDIR»/build-dir/bootstrap/base/runtime/c-libs/posix-os'
Source (for reproduction):
Summary:
Fails to build on Linux PowerPC

Detailed description
The _ml_os_tmpname changes in 110.77 caused the build to fail on Linux PowerPC systems. The attached patch updates the build config for ppc to fix the build issues.

Comments:

Message  ↓
Date: 2015-07-23 11:14
Sender: James McCoy

Sorry for not being clear enough, but the problem is actually that tmpnam is trying to be used instead of mkstemp. The patch updated ml-unixdep.h so the build process knows Linux PPC can use mkstemp and added the necessary -D_GNU_SOURCE to mk.ppc-linux.

Date: 2015-07-23 10:08
Sender: John Reppy

Fixed for 110.79 by changing // comment to /* */ comment.

Attached Files:

Attachments:
Size Name Date By Download
964 bytesppc-build-fixes.diff2015-07-23 03:14jamessanppc-build-fixes.diff

Changes

Field Old Value Date By
status_idOpen2015-07-23 10:08jhr
close_dateNone2015-07-23 10:08jhr
assigned_tonone2015-07-23 10:08jhr
ResolutionNone2015-07-23 10:08jhr
File Added8: ppc-build-fixes.diff2015-07-23 03:14jamessan