Opened 8 years ago
Closed 7 years ago
#53974 closed defect (fixed)
texlive-basic: dvips exits with trap 6
Reported by: | slewsys (Andrew L. Moore) | Owned by: | drkp (Dan Ports) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | sierra | Cc: | mojca (Mojca Miklavec), diochnos, petermichor, josmithiii |
Port: | texlive-basic |
Description
Dvips
on macOS 10.12.4 exits with trap 6 building asymptote
2.41 documentation from MacPorts GitHub HEAD.
Dvips
had no trouble building asymptote
2.40 last month (March, 2017). The only change that I can attribute is upgrading Xcode to version 8.3.1.
By swapping dvips
from MacPorts with dvips
(and only dvips
) from MacTeX 2016, the asymptote
build succeeds. Both MacPorts and MacTeX dvips
are version 5.996.
Attaching asymptote
build log. The log doesn't show dvips
trap 6 (SIGABRT). That must be from a manual build...
Attachments (9)
Change History (31)
Changed 8 years ago by slewsys (Andrew L. Moore)
comment:1 Changed 8 years ago by slewsys (Andrew L. Moore)
Attaching successful build log of asymptote 2.41 build with MacTeX dvips. Only two changes here:
- Append /Library/TeX/texbin to
binpath
in macports.conf. - Move
${prefix}/bin/dvips
to${prefix}/bin/dvips-dist
.
Changed 8 years ago by slewsys (Andrew L. Moore)
Attachment: | main.2.log added |
---|
asymptote 2.41 successful build log using MacTeX dvips and otherwise MacPorts texlive
comment:2 Changed 8 years ago by mf2k (Frank Schima)
Owner: | set to drkp |
---|---|
Status: | new → assigned |
In the future, please Cc the port maintainers (port info --maintainers texlive-basic
), if any.
comment:3 Changed 8 years ago by drkp (Dan Ports)
Status: | assigned → accepted |
---|
I can reproduce this with xcode 8.3.1, but haven't been able to figure out the cause yet...
comment:4 Changed 8 years ago by mf2k (Frank Schima)
Owner: | changed from drkp to mojca |
---|---|
Port: | asymptote added |
Status: | accepted → assigned |
comment:5 Changed 8 years ago by mf2k (Frank Schima)
Cc: | mojca added |
---|---|
Owner: | changed from mojca to drkp |
comment:6 Changed 8 years ago by diochnos
Cc: | diochnos added |
---|
comment:7 Changed 8 years ago by mojca (Mojca Miklavec)
Can you please also attach the dvi files in questions (for example CAD1_.dvi
)?
Changed 8 years ago by slewsys (Andrew L. Moore)
Bode_.dvi => Bode_.ps via `dvips -R -Pdownload35 -D600 -O-128.4bp,522.983bp -T612bp,792bp -tletterSize -oBode_.ps Bode_.dvi'
Changed 8 years ago by slewsys (Andrew L. Moore)
Expected result of processing Bode_.dvi
Changed 8 years ago by slewsys (Andrew L. Moore)
CAD1_.dvi => CAD1_.ps via `dvips -R -Pdownload35 -D600 -O-128.4bp,579.491bp -T612bp,792bp -tletterSize -oCAD1_.ps CAD1_.dvi'
Changed 8 years ago by slewsys (Andrew L. Moore)
Expected result of processing CAD1_.dvi
comment:8 Changed 8 years ago by mojca (Mojca Miklavec)
Please also add CAD1_0.eps
for completeness (otherwise it's impossible to run dvips
on that file).
Changed 8 years ago by slewsys (Andrew L. Moore)
Attachment: | CAD1_0.eps added |
---|
Encapsulated PostScript
comment:9 Changed 8 years ago by mojca (Mojca Miklavec)
This works for me. What happens if you run:
/opt/local/bin/dvips -R -Pdownload35 -D600 -O-128.4bp,579.491bp -T612bp,792bp -tletterSize -oCAD1_.ps CAD1_.dvi
(Adjust that to your prefix.)
It might be due to some "corrupt" configuration files.
comment:10 Changed 8 years ago by drkp (Dan Ports)
I can reproduce this but only after upgrading Xcode to 8.3.1 and rebuilding texlive-bin. It worked fine with an earlier xcode version.
I have no idea why this is, and I haven't had a chance to look into it yet...
comment:11 Changed 8 years ago by mojca (Mojca Miklavec)
Andrew, if you have time to test, would you perhaps be willing to compile the latest TL sources (from subversion) with Xcode 8.3.1?
svn://tug.org/texlive/trunk/Build/source
Then make a backup of the existing dvips
binary and replace it with the freshly built one (it probably makes sense to replace the one inside MacTeX) and try to run dvips
on the above files (don't bother with asymptote installation).
comment:13 Changed 8 years ago by mojca (Mojca Miklavec)
In that case I suspect some issue that's really specific to the latest compiler, potentially also related to gs
. Note that dvips
from MacTeX 2016 has been compiled on 10.6 with gcc 4.2, so a different stdlib is being used.
Asymptote is also reported to be broken in some aspects after being compiled on Yosemite.
It wouldn't be the first time: #43728.
comment:14 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | petermichor added |
---|---|
Keywords: | sierra added |
Port: | asymptote removed |
Summary: | Dvips on macOS 10.12.4 exits with trap 6 building asymptote 2.41 documentation → texlive-basic: dvips exits with trap 6 |
Has duplicate #54126.
comment:15 Changed 7 years ago by diochnos
Just to add a small related comment, which may give an additional hint.
There appears to be a similar issue with dvipdf: it generates a pdf file, but the resulting pdf document is empty (one empty white page). This behavior started after upgrading to the latest Xcode version (8.3.32 / around April 19, or earlier). For example, you can try dvipdf Bode_.dvi
with the file provided above.
Actually I have subscribed to this thread when my real issue is the dvipdf command.
comment:16 Changed 7 years ago by brunoomartin
dvips still exits with Abort trap: 6 after recompiling the texlive-basic @41271_0+doc with Xcode 8.3.2 on OSX 10.12.5 on a MPB mid 2015
Changed 7 years ago by slewsys (Andrew L. Moore)
Attachment: | dvips.patch added |
---|
Patch texk/dvipsk/color.c. Fixes ticket #53974
comment:17 Changed 7 years ago by slewsys (Andrew L. Moore)
Attachment fixes dvips SIGABRT when divps compiled with clang compiler. Caused by bad pointer declaration, most likely a typo. TODO: submit up-stream as needed.
comment:18 follow-up: 19 Changed 7 years ago by mojca (Mojca Miklavec)
The patch above points to the right direction, but doesn't seem to be entirely correct. Here's a revised patch written by Akira Kakuto. Can you please test that one?
-
texk/dvipsk/color.c
old new 37 37 struct colorpage *next; 38 38 integer boploc; /* we use the bop loc as a page indicator */ 39 39 char *bg; 40 char colordat[2];40 char *colordat; 41 41 } *colorhash[COLORHASH]; 42 42 static char *cstack, *csp, *cend, *bg; 43 43 /* … … 84 84 for (i=0; i<COLORHASH; i++) { 85 85 for (p=colorhash[i]; p; p = q) { 86 86 q = p->next; 87 free(p->colordat); 87 88 free(p); 88 89 } 89 90 colorhash[i] = 0; … … 216 217 } 217 218 } else { 218 219 p = (struct colorpage *)mymalloc((integer) 219 (strlen(cstack) + sizeof(struct colorpage) + MAXCOLORLEN)); 220 (sizeof(struct colorpage))); 221 p->colordat = mymalloc(strlen(cstack) + MAXCOLORLEN + 2); 220 222 p->next = colorhash[h]; 221 223 p->boploc = pageloc; 222 224 strcpy(p->colordat, cstack);
comment:19 Changed 7 years ago by slewsys (Andrew L. Moore)
Replying to mojca:
The patch above points to the right direction, but doesn't seem to be entirely correct. Here's a revised patch written by Akira Kakuto. Can you please test that one?
Akira's patch is correct. I was thinking that separately allocating colordat isn't necessary, but actually it is. The declaration colordat[2] was evidently a hack to avoid that allocation, but clang won't let you get away with it. So changing colordat to a single pointer and separately allocating/freeing it is correct. Thanks to Akira Kakuto for clear thinking :)
comment:20 Changed 7 years ago by drkp (Dan Ports)
Seems to work fine with the texlive 2017 update I am working on. (I haven't tested it with the version in the regular ports tree yet; need to switch back to that first)
comment:21 Changed 7 years ago by josmithiii
Cc: | josmithiii added |
---|
comment:22 Changed 7 years ago by drkp (Dan Ports)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
asymptote 2.41 failed build log using MacPorts dvips and Xcode 8.3.1