jfisteus / html2xhtml

Command-line HTML to XHTML converter
http://www.it.uc3m.es/jaf/html2xhtml/
Other
43 stars 23 forks source link

Unable to compile on mac #14

Closed sa6k0o0 closed 7 years ago

sa6k0o0 commented 7 years ago

make /Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive Making all in src gcc -DHAVE_CONFIG_H -I. -I.. -std=c99 -g -O2 -MT html.o -MD -MP -MF .deps/html.Tpo -c -o html.o html.c html.l:137:19: error: expected '}'

line 138 "html.l"

              ^

html.c:1170:2: note: to match this '{' { / beginning of action switch / ^ html.l:137:19: error: expected '}'

line 138 "html.l"

              ^

html.c:1124:3: note: to match this '{' { ^ html.l:137:19: error: expected '}'

line 138 "html.l"

              ^

html.c:1086:1: note: to match this '{' { ^ 3 errors generated. make[2]: [html.o] Error 1 make[1]: [all-recursive] Error 1 make: *** [all] Error 2

gmckenzi commented 7 years ago

I see the issue was closed, but was there a solution?

jfisteus commented 7 years ago

The same user that reported the issue closed it almost immediately without further explanation. I assumed therefore that no code changes were needed. Are you affected by the same problem?

gmckenzi commented 7 years ago

Yes, unfortunately, the same error. I can see that html.c does end without a closing brace.

sa6k0o0 commented 7 years ago

Well, I solved the error. The issue is that mac users normally have this problem with any gcc program if they have certain flags set on or off. I forgot what flags exactly need to be set, but they are different from the default for MacOS , and after I compiled it, I reverted the flags the way mac has it out of the box.

jfisteus commented 7 years ago

Thanks a lot for the information, @sa6k0o0. Do you know of any web page or document that explains how to do that? It would be quite useful to @gmckenzi and other users facing the same issue. I'm not familiar with Mac and cannot help with this one.

sa6k0o0 commented 6 years ago

I know I had to install some packages also. This is the complete list of what I have installed : autoconf gettext libtool openssl automake icu4c

I am not sure which of those are really needed to compile this project, it was long time ago since I solved this problem for myself. And the most tricky part was with gettext:

This is what I ended up doing brew link gettext --force and once I was done I just did brew unlink gettext

I got the idea from https://superuser.com/questions/747324/brew-install-gettext-should-i-force-link-it

I used brew to install all of those things. Hope this helps

sa6k0o0 commented 6 years ago

The only reason I closed this issue was because if you are experienced c++ developer and if you are using mac, I assumed that you would know this things. I didn't know them and I spent quite some time researching and I hope this helps.

jfisteus commented 6 years ago

Thanks for your help, @sa6k0o0