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

missing obstack.h #21

Open
ShaharHD opened this issue Mar 30, 2019 · 6 comments
Open

missing obstack.h #21

ShaharHD opened this issue Mar 30, 2019 · 6 comments

Comments

@ShaharHD
Copy link

Trying to build on Mac (10.14.4) and keep getting short on obstack.h

I've modified the makefile to include one (from another mac ports) - but I'm now failing on this error:

Making all in util
  CC       obstack.lo
obstack.c:301:5: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
    __INT_TO_PTR ((__PTR_TO_INT (new_chunk->contents) + h->alignment_mask)

I can try and disable the warning, but is it safe?

@lechium
Copy link

lechium commented May 6, 2020

same issue +1

@spbnick
Copy link
Member

spbnick commented May 6, 2020

Never had access to a Mac, so can't reproduce, but if somebody gives me that obstack.c, I can try to figure out if it's safe. Otherwise, I would say using obstack in hidrd is an overkill and I would welcome a patch getting rid of it.

@lechium
Copy link

lechium commented May 6, 2020

i grabbed on from cctools so im not even sure if its an appropriate copy to try to use. im not familiar with what obstack does in the first place so a patch for this would be out of my depth personally! i also cant even get it to build with the obstack so thats my latest obstacle.

obstack-cctools.zip

@ShaharHD
Copy link
Author

ShaharHD commented May 6, 2020

@lechium @spbnick got it working!

Another update
with the files @lechium sent, the fix was fairly simple to make it finish the build.
I'll create a Fork and a PR later today for you to review

The issue is now that it is looking for __obstack_begin which means I need to get the obstack as a static library into the code.

Working on it, will fork and create a PR

@ShaharHD
Copy link
Author

ShaharHD commented May 6, 2020

@lechium @spbnick Created PR #24

@ShaharHD
Copy link
Author

PR #24 updated with removing obstack all together

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