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

Issues compiling trafgen with musl #174

Closed
archey opened this Issue May 12, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@archey
Contributor

archey commented May 12, 2017

I am having a few issues compiling trafgen against musl. I was able to patch one issue with the small patch here:
build log: https://gist.github.com/archey/67f3f40c76c57751c4d3bc46a65e5f55

This tiny patch fixes the issue with missing ino_t:

https://gist.github.com/archey/302f540c6f37284e4002fbd5c0b0ce7f

However trafgen is now failing due to a redefinition error:

https://gist.github.com/archey/07a79b85d446c2d2532ff46bb5e5c4f0

@archey

This comment has been minimized.

Show comment
Hide comment
@archey

archey May 13, 2017

Contributor

I fixed a few issues here and applied a few missing patches and its a lot closer.

build log: https://gist.github.com/archey/6d3cfc1e8888674a97f78b457fa83453

I have applied the following patches

f232545

b25a51f

a9f4431

a5a5a91

Contributor

archey commented May 13, 2017

I fixed a few issues here and applied a few missing patches and its a lot closer.

build log: https://gist.github.com/archey/6d3cfc1e8888674a97f78b457fa83453

I have applied the following patches

f232545

b25a51f

a9f4431

a5a5a91

@tklauser

This comment has been minimized.

Show comment
Hide comment
@tklauser

tklauser May 13, 2017

Contributor

After applying 5ca91a8 and b118a01 the libintl issues should be gone as well. Care to try?

Contributor

tklauser commented May 13, 2017

After applying 5ca91a8 and b118a01 the libintl issues should be gone as well. Care to try?

@archey

This comment has been minimized.

Show comment
Hide comment
@archey

archey May 13, 2017

Contributor

Sure I will test it right now, thanks for helping out with this. I know its been alot of changes and fixes to the source code.

Contributor

archey commented May 13, 2017

Sure I will test it right now, thanks for helping out with this. I know its been alot of changes and fixes to the source code.

@archey

This comment has been minimized.

Show comment
Hide comment
@archey

archey May 13, 2017

Contributor

Trafgen is fixed after applying those two patches as well as the patches I listed above. However I am seeing a issue with curvetun as well:

build log: https://gist.github.com/archey/da240d7139ec72fe380547a9955d091d

In doing some research it appears that cookie.c needs

#define _GNU_SOURCE
#include <stdio.h>

However I looking at the source code for the cookie.c file I see that is already defined at the very top.

Contributor

archey commented May 13, 2017

Trafgen is fixed after applying those two patches as well as the patches I listed above. However I am seeing a issue with curvetun as well:

build log: https://gist.github.com/archey/da240d7139ec72fe380547a9955d091d

In doing some research it appears that cookie.c needs

#define _GNU_SOURCE
#include <stdio.h>

However I looking at the source code for the cookie.c file I see that is already defined at the very top.

@Shizmob

This comment has been minimized.

Show comment
Hide comment
@Shizmob

Shizmob May 13, 2017

musl doesn't have fopencookie(), but it can be reimplemented in terms of usual libc functionality, as the patches here do: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/libsolv/libsolv?id=378b333fb09d106fb04901f5a4362fc0eb076e82

Shizmob commented May 13, 2017

musl doesn't have fopencookie(), but it can be reimplemented in terms of usual libc functionality, as the patches here do: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/libsolv/libsolv?id=378b333fb09d106fb04901f5a4362fc0eb076e82

@tklauser

This comment has been minimized.

Show comment
Hide comment
@tklauser

tklauser Oct 20, 2017

Contributor

curvetun is the only tool using fopencookie(3) and carrying a patch just for that is not worth the effort IMO. Instead, we now just disable building curvetun in case fopencookie() is not available (e.g. when compiling against musl), see e843d29.

Contributor

tklauser commented Oct 20, 2017

curvetun is the only tool using fopencookie(3) and carrying a patch just for that is not worth the effort IMO. Instead, we now just disable building curvetun in case fopencookie() is not available (e.g. when compiling against musl), see e843d29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment