evristzam / ndt

Automatically exported from code.google.com/p/ndt
Other
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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] https://github.com/mxcl/homebrew/pull/25093
[1] https://gist.github.com/igable/7881828

Original issue reported on code.google.com by iga...@gmail.com on 11 Dec 2013 at 8:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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/4475e6e653f080be111fa0a3fd649af42fa14
c3d/ndt-3.6.5.2-osx-10.9.patch -o igable.patch
patch -p1 < igable.patch

Original comment by iga...@gmail.com on 22 Dec 2013 at 7:17

GoogleCodeExporter commented 9 years ago
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

Original comment by rsanger...@gmail.com on 23 Dec 2013 at 11:23

Attachments:

GoogleCodeExporter commented 9 years ago
Try attach the patch again.

Original comment by rsanger...@gmail.com on 23 Dec 2013 at 11:26

Attachments:

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

Original comment by mike@mikemcquaid.com on 23 Dec 2013 at 11:42

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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.

Original comment by rsanger...@gmail.com on 23 Dec 2013 at 1:15

GoogleCodeExporter commented 9 years ago
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

Original comment by rsanger...@gmail.com on 8 Feb 2014 at 3:34

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by jslawin...@soldevelo.com on 25 Jun 2014 at 8:31