Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building neateqn on Mac OS X 10.12 #1

Open
pukku opened this issue Jul 8, 2018 · 2 comments
Open

Error when building neateqn on Mac OS X 10.12 #1

pukku opened this issue Jul 8, 2018 · 2 comments

Comments

@pukku
Copy link

pukku commented Jul 8, 2018

Hi! I tried to install neatroff on Mac OS X 10.12, following the instructions at http://litcave.rudi.ir/neatstart.pdf. It failed at the make neat step. I modified the Makefile to show me what sub-program the error was in, and it turned out to be neateqn.

Here is the output of the compilation (I've replaced the directories with [neatroff_make_dir]):

$ make neat
starting neatroff
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" roff.c
roff.c:34:18: warning: format string is not a string literal
	  (potentially insecure) [-Wformat-security]
		fprintf(stderr, msg);
						^~~
roff.c:34:18: note: treat the string as an argument to avoid this
		fprintf(stderr, msg);
						^
						"%s", 
1 warning generated.
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" dev.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" font.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" in.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" cp.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" tr.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" ren.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" out.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" reg.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" sbuf.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" fmt.c
fmt.c:447:15: warning: absolute value function 'abs' given an argument of type
	  'long' but has parameter of type 'int' which may cause truncation of value
	  [-Wabsolute-value]
		long ratio = abs((llen - lwid) * 100l / (swid ? swid : 1));
					 ^
fmt.c:447:15: note: use function 'labs' instead
		long ratio = abs((llen - lwid) * 100l / (swid ? swid : 1));
					 ^~~
					 labs
1 warning generated.
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" eval.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" draw.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" wb.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" hyph.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" map.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" clr.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" char.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" dict.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" iset.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" "-DTROFFMDIR=\"[neatroff_make_dir]/tmac\"" dir.c
cc -o roff roff.o dev.o font.o in.o cp.o tr.o ren.o out.o reg.o sbuf.o fmt.o eval.o draw.o wb.o hyph.o map.o clr.o char.o dict.o iset.o dir.o 
starting neatpost
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" post.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" ps.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" font.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" dev.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" clr.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" dict.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" iset.c
cc -o post post.o ps.o font.o dev.o clr.o dict.o iset.o 
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" pdf.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" pdfext.c
cc -c -Wall -O2 "-DTROFFFDIR=\"[neatroff_make_dir]/\"" sbuf.c
cc -o pdf post.o pdf.o pdfext.o font.o dev.o clr.o dict.o iset.o sbuf.o 
starting neateqn
cc -c -Wall -O2 eqn.c
eqn.c:530:18: warning: format string is not a string literal
	  (potentially insecure) [-Wformat-security]
		fprintf(stderr, msg);
						^~~
eqn.c:530:18: note: treat the string as an argument to avoid this
		fprintf(stderr, msg);
						^
						"%s", 
1 warning generated.
cc -c -Wall -O2 tok.c
cc -c -Wall -O2 src.c
cc -c -Wall -O2 def.c
cc -c -Wall -O2 box.c
cc -c -Wall -O2 reg.c
cc -c -Wall -O2 sbuf.c
cc -o eqn eqn.o tok.o src.o def.o box.o reg.o sbuf.o 
starting neatmkfn
cc -c -O2 -Wall mkfn.c
cc -c -O2 -Wall trfn.c
cc -c -O2 -Wall sbuf.c
cc -c -O2 -Wall tab.c
cc -c -O2 -Wall afm.c
cc -c -O2 -Wall otf.c
cc -o mkfn mkfn.o trfn.o sbuf.o tab.o afm.o otf.o 
starting neatrefer
cc -c -Wall -O2 refer.c
cc -o refer refer.o 
starting troff/pic
cc -c -Wall -O2 picy.c
picy.c:795:3: error: unterminated function-like macro invocation
{ ERROR "syntax error" WARNING; } break;
  ^
./pic.h:13:15: note: expanded from macro 'ERROR'
#define ERROR   sprintf(errbuf,
				^
/usr/include/secure/_stdio.h:46:9: note: macro 'sprintf' defined here
#define sprintf(str, ...) \
		^
picy.c:1094:2: error: expected '}'
}
 ^
picy.c:795:1: note: to match this '{'
{ ERROR "syntax error" WARNING; } break;
^
picy.c:1094:2: error: expected '}'
}
 ^
picy.c:792:14: note: to match this '{'
		switch(yym) {
					^
picy.c:1094:2: error: expected '}'
}
 ^
picy.c:641:1: note: to match this '{'
{
^
picy.c:662:9: warning: array index -1 is before the beginning of the array
	  [-Warray-bounds]
		yyp = &yys[-1];
			   ^   ~~
picy.c:642:2: note: array 'yys' declared here
		struct
		^
1 warning and 4 errors generated.
make[1]: *** [picy.o] Error 1
make: *** [neat] Error 2

$ cc --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Any idea of how I can fix this?

Thanks,
Ricky

@polluks
Copy link
Contributor

polluks commented Aug 23, 2021

@pukku Please take care neateqn was already built!
It seems to be a troff issue because of starting troff/pic in the log.

@aligrudi
Copy link
Owner

aligrudi commented Aug 25, 2021 via email

polluks added a commit to polluks/neateqn that referenced this issue Aug 16, 2023
@aligrudi aligrudi mentioned this issue Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants