fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
523 stars 55 forks source link

build failed on osx #141

Closed AndorChen closed 11 years ago

AndorChen commented 11 years ago

I got this error when builded in osx:

linking shared-object peg_multimarkdown.bundle
ld: duplicate symbol _syntax_extensions in markdown_parser.o and markdown_output.o
collect2: ld returned 1 exit status
make: *** [peg_multimarkdown.bundle] Error 1

any ideas on what happened here?

thx

fletcher commented 11 years ago

Did you do make clean first?

Sent from my iPhone

On Jan 2, 2013, at 9:34 AM, Andor Chen notifications@github.com wrote:

I got this error when builded in osx:

linking shared-object peg_multimarkdown.bundle ld: duplicate symbol _syntax_extensions in markdown_parser.o and markdown_output.o collect2: ld returned 1 exit status make: *\ [peg_multimarkdown.bundle] Error 1

any ideas on what happened here?

thx

— Reply to this email directly or view it on GitHubhttps://github.com/fletcher/peg-multimarkdown/issues/141.

AndorChen commented 11 years ago

@fletcher yes, make clean and then make, but the error stills

fletcher commented 11 years ago

Give me a few hours to get back to computer and look into it, but it compiled fine for me.

Check development branch as well, just in case.

F-

On Jan 2, 2013, at 10:07 AM, Andor Chen wrote:

@fletcher yes, make clean and then make, but the error stills

— Reply to this email directly or view it on GitHub.

Fletcher T. Penney fletcher@fletcherpenney.net

AndorChen commented 11 years ago

@fletcher thanks very much, and i got some other errors:

compiling odf.c
odf.c:18: error: expected ‘)’ before ‘*’ token
odf.c:180: error: expected ‘)’ before ‘*’ token
make: *** [odf.o] Error 1
fletcher commented 11 years ago

What version of OS X and Xcode are you using?

Sent from my iPhone

On Jan 2, 2013, at 10:22 AM, Andor Chen notifications@github.com wrote:

@fletcher https://github.com/fletcher thanks very much, and i got some other errors:

compiling odf.c odf.c:18: error: expected ‘)’ before ‘’ token odf.c:180: error: expected ‘)’ before ‘’ token make: *\ [odf.o] Error 1

— Reply to this email directly or view it on GitHubhttps://github.com/fletcher/peg-multimarkdown/issues/141#issuecomment-11811313.

AndorChen commented 11 years ago

Mac OS X 10.6.8 Xcode 3.2.3

fletcher commented 11 years ago

Are you sure you have a clean copy of the github project? These seem like strange errors.

I compiled today on 10.6.8, but had Xcode 4 (4.2?). Maybe that's the difference, but I have not been able to replicate your issue.

AndorChen commented 11 years ago

@fletcher maybe the error is related to the glib. i removed the glib.h, GLibFacade.h and GLibFacade.c, and install glib, then the build successed

btw, i was building the c extension in ruby

fletcher commented 11 years ago

Ahh... Burying the lede.... ;)

GLibFacade replaces the routines from glib so that the glib libraries are no longer required. If you're compiling for ruby, it may already have glib declared and included, causing the problem (basically a namespace collision). There shouldn't be any issue with using this approach.

BTW - I had looked (briefly) at adding MMD support to the github wiki software. I don't have a lot of experience with ruby, but it looked like I would need a piece of ruby code, and then to have the MMD software compiled to do the heavy lifting when called via the ruby code. This would allow users to include MultiMarkdown (and not just regular Markdown) in README's and wiki pages on github.

It sounds as though you may have already done the hard part. Any interest in working with me to get this enabled?

fletcher commented 11 years ago

Here's the link where I started digging:

https://github.com/github/markup

AndorChen commented 11 years ago

@fletcher i have wrapped the lib in a ruby gem, you can install it via gem install rpeg-multimarkdown2, and the source is at https://github.com/AndorChen/rpeg-multimarkdown2

the gem is still under test, so maybe contents errors