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

embeded old strlcpy/strlcat definitions prevent build of web100clt on OSX 10.9 Mavericks #106

Open
aaronmbr opened this issue Mar 31, 2015 · 9 comments

Comments

@aaronmbr
Copy link
Contributor

Original issue 106 created by aaronmbr on 2013-12-11T20:30:03.000Z:

I've been maintaining the mac homebrew formula for web100clt[0] tool from the NDT package. With the release of OSX 10.9 strlcpy and strlcat functions are both already defined (build error [1]). In order to build the package on OSX 10.9 one must set CFLAG -D_FORTIFY_SOURCE=0.

Is there still a reason to define these macros in preference to the ones provided by the OS?

Un-defining them in OSX 10.9 and Scientific Linux 6.4 both works.

FYI NDT 3.6.5.2 defines these macros in:
strlutils.h

[0] Homebrew/legacy-homebrew#25093
[1] https://gist.github.com/igable/7881828

@aaronmbr
Copy link
Contributor Author

Comment #1 originally posted by aaronmbr on 2013-12-22T19:16:27.000Z:

Here's a patch that will fix this issue:
https://gist.github.com/igable/8077668

To apply the patch do:
ndt-3.6.5.2
curl https://gist.github.com/igable/8077668/raw/4475e6e653f080be111fa0a3fd649af42fa14c3d/ndt-3.6.5.2-osx-10.9.patch -o igable.patch
patch -p1 < igable.patch

@aaronmbr
Copy link
Contributor Author

Comment #2 originally posted by aaronmbr on 2013-12-22T19:17:39.000Z:

Here's a patch that will fix this issue:
https://gist.github.com/igable/8077668

To apply the patch do:
cd ndt-3.6.5.2
curl https://gist.github.com/igable/8077668/raw/4475e6e653f080be111fa0a3fd649af42fa14c3d/ndt-3.6.5.2-osx-10.9.patch -o igable.patch
patch -p1 < igable.patch

@aaronmbr
Copy link
Contributor Author

Comment #3 originally posted by aaronmbr on 2013-12-23T11:23:29.000Z:

Thanks for bug report,

The issue with simply removing strlutils.* as suggested is that GNU Linux(glibc) doesn't include strlcpy or strlcat and in this case we still need to define these.
This problem is summed up well here http://stackoverflow.com/a/4570369

I've attached a patch that will add a test for strlcpy to the Autotools process to hopefully fix this.

I've tested this against Debian, which is missing strlcpy/cat.
Could I get you to test this against OSX 10.9 and confirm this fix works.
If anyone else wants to test against their configuration that would be great too, you just need to verify ndt still builds successfully.

You will need run the following commands in the ndt directory:
patch -p0 < autotools_strlcpy.diff
./bootstrap
./configure
make

The patch is against the svn trunk but will also apply correctly to 3.6.5.2, but you will be missing bootstrap.
You can get it like this:
wget http://ndt.googlecode.com/svn/trunk/bootstrap
chmod u+x ./bootstrap

Thanks,
Richard

@aaronmbr
Copy link
Contributor Author

Comment #4 originally posted by aaronmbr on 2013-12-23T11:26:25.000Z:

Try attach the patch again.

@aaronmbr
Copy link
Contributor Author

Comment #5 originally posted by aaronmbr on 2013-12-23T11:42:17.000Z:

This patch doesn't seem to fix the issue. See my compilation output here:
https://gist.github.com/mikemcquaid/8095736

@aaronmbr
Copy link
Contributor Author

Comment #6 originally posted by aaronmbr on 2013-12-23T11:42:43.000Z:

You can follow/join the discussion on Homebrew here: Homebrew/legacy-homebrew#25093

@aaronmbr
Copy link
Contributor Author

Comment #7 originally posted by aaronmbr on 2013-12-23T13:15:50.000Z:

Thanks for trying this out.
Did you run ./bootstrap because this is required to update the ./configure script?

In terms of making this into a single patch for release, running ./bootstrap can be avoided by including changes to ./configure in the patch.

@aaronmbr
Copy link
Contributor Author

Comment #8 originally posted by aaronmbr on 2014-02-08T03:34:41.000Z:

I've attached a copy of ndt-3.6.5.2 again with the patch applied and bootstrap run.

So all that is needed is to download and compile like normal
tar xvf ndt-3.6.5.2strlcpy.tar.gz
cd ndt-3.6.5.2
./configure
make

I have no way of testing this on Mavericks, is it possible someone could test this.

Thanks

@aaronmbr
Copy link
Contributor Author

Comment #9 originally posted by aaronmbr on 2014-06-25T08:31:21.000Z:

<empty>

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

No branches or pull requests

1 participant