Skip to content

Fixes for #8 - Ubuntu 11.10 Makefile #9

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixes for #8 - Ubuntu 11.10 Makefile #9

wants to merge 2 commits into from

Conversation

gsandie
Copy link

@gsandie gsandie commented Jan 11, 2012

Attempted fixes for issue #8.

Created a script that will grab the ubuntu version number from the
/etc/issue file. Make changes to the Makefile so that if Ubuntu 11.10 is
detected then the gcc command string is changed to put the LDFLAGS var
at the end of the line.

Have tested on Ubuntu 10.04 and 11.10, unfortunately I have no non-ubuntu or Linux systems to hand to test with.

Attempted fixes for issue #8.

Created a script that will grab the ubuntu version number from the
/etc/issue file. Make changes to the Makefile so that if Ubuntu 11.10 is
detected then the gcc command string is changed to put the LDFLAGS var
at the end of the line.
Previous commit was too hasty. The test suite hadn't been run and was
failing, and the changes hadn't been added to libgrok.

Adding the LDFLAGS changes to the test Makefile allows the tests to pass
again. The libgrok file is now also built with the correct settings.
@gsandie
Copy link
Author

gsandie commented Jan 11, 2012

The test suite is now passing, and I believe that this issue is resolved.

@lstanden
Copy link

Just confirming this has tested successfully for me. Much appreciated :)

@mattmcclean
Copy link

Yes, had same problem but now working. Thanks!!

@jassik
Copy link

jassik commented Jul 9, 2012

It does'nt work with 12.04. With Precise out, should not the test be against the gcc version used instead of the Distro version.

@juanje
Copy link

juanje commented Jul 10, 2012

I got the same problem but I was used an Ubuntu derivated distro which has the /etc/issue changed (which is not so uncommon).
I believe it could be better if you test against the /etc/lsb-release (which is meant for that purpose) or its commandline:

ubuntu-version.sh

#!/bin/sh

if [ "$(lsb_release -si)" = "Ubuntu" ]; then
  VERSION=`lsb_release -sr`
fi

echo $VERSION

Anyway, probably is better to check the gcc version instead of the distro one.

Btw, @gsandie thanks for the fix, it saved me a lot of time 😄

@gsandie
Copy link
Author

gsandie commented Jul 10, 2012

Yeah you're right. At the time I just went for the simplest thing that worked for me! :)

I'll try and take a look at updating this commit today to something that is more portable.

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

Successfully merging this pull request may close these issues.

5 participants