mandown icon indicating copy to clipboard operation
mandown copied to clipboard

Fails while compiling

Open 097115 opened this issue 5 years ago • 12 comments

macOS 10.11:

gcc -c -g -O3 -fPIC -Wall -Wsign-compare -Iparser -Iblender -Iinclude -I/usr/include/libxml2   -c -o src/mandown.o src/mandown.c
gcc -c -g -O3 -fPIC -Wall -Wsign-compare -Iparser -Iblender -Iinclude -I/usr/include/libxml2   -c -o src/view.o src/view.c
src/view.c:104:19: error: use of undeclared identifier
      'A_ITALIC'
        attr[1] = A_ITALIC;
                  ^
1 error generated.
make: *** [src/view.o] Error 1

097115 avatar May 12 '20 03:05 097115

Interesting, would you mind sharing your Ncurses version? I read somewhere that Homebrew has a new version of Ncursesw that links to the older Ncurses. I’ll do some search as well.

Titor8115 avatar May 12 '20 06:05 Titor8115

Interesting, would you mind sharing your Ncurses version?

Was 6.1, upgraded with Homebrew to 6.2 (via downloading this file), same error :)

097115 avatar May 12 '20 06:05 097115

Interesting, would you mind sharing your Ncurses version?

Was 6.1, upgraded with Homebrew to 6.2 (via downloading this file), same error :)

Titor8115 avatar May 12 '20 06:05 Titor8115

Interesting, would you mind sharing your Ncurses version?

Was 6.1, upgraded with Homebrew to 6.2 (via downloading this file), same error :)

That is strange... I did find A_ITALIC macro in the tar file you uploaded. Would you mind try one more thing by changing A_ITALIC to A_NORMAL and see if it would compile.

Titor8115 avatar May 12 '20 07:05 Titor8115

Yeah, it compiles[1] but doesn't display italics as a consequence :)

-- [1]: I also had to change Makefile:30 from this:

LDFLAGS=-g -O3 -Wl,--copy-dt-needed-entries -lncursesw -lxml2 -Wall -Werror

to this:

LDFLAGS=-g -O3 -Wl,-lncurses -lxml2 -Wall -Werror

097115 avatar May 12 '20 07:05 097115

I’ll see what can be done.

The Makefile is under makeover. I didn’t expect the sudden increase in community and system at the beginning.

Titor8115 avatar May 12 '20 15:05 Titor8115

No problem :)

097115 avatar May 12 '20 15:05 097115

On macOS, as a temporary fix, you could replace A_ITALIC with NCURSES_BITS(1U,23), which is the original definition in ncurses.h. Also, remove --copy-dt-needed-entries from LDFLAGS as already stated above.

lucamot avatar May 15 '20 21:05 lucamot

you could replace A_ITALIC with NCURSES_BITS(1U,23)

@lucamot, the resulting file, compiled with these changes still doesn't display italics for me, though.

097115 avatar May 16 '20 12:05 097115

@097115 I uploaded a new Makefile and view.h to fix the compile issue and A_ITALIC issue. It just hit my mind that the terminal emulator might be the reason ITALIC isn't rendered. What emulator are you using?

Titor8115 avatar May 28 '20 23:05 Titor8115

It just hit my mind that the terminal emulator might be the reason ITALIC isn't rendered

No :). I've tried iTerm and Alacritty, they both support italics.

(On this nw Makefile: it compiles now but italics indeed aren't rendered.)

097115 avatar May 29 '20 02:05 097115

No :). I've tried iTerm and Alacritty, they both support italics.

(On this nw Makefile: it compiles now but italics indeed aren't rendered.)

Alright, I'll test it out if it is an issue across Mac OS. And I'll try to implement ANSI for the italics.

And thanks for the feedback!!!!

Titor8115 avatar May 29 '20 13:05 Titor8115