djwmarks / netmap

Automatically exported from code.google.com/p/netmap
1 stars 0 forks source link

get-drivers: awk fails to detect hex numbers #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
This happened when trying to compile netmap for linux-3.14.21.

What is the expected output? What do you see instead?
I was expecting to get patched drivers, because there are patches that have 
upper number 99999. Instead make prints:

LIN_VER 30e15
-- NO DRIVERS --

What version of the product are you using? On what operating system?
I'm using latest netmap, commit 3ccdada on Ubuntu 13.10 with linux-3.14.21. 
I've installed kernel image and headers from here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.21-utopic/

I took the kernel source from kernel.org because Ubuntu doesn't have specific 
patches for this kernel version:
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.21.tar.xz

Please provide any additional information below.

I installed the deb images and started Ubuntu 13.10 with kernel 3.14.21, 
everything works fine from what I can see. I build netmap with:
make SRC=<path_to_extracted_3.14.21_sources>

The problem seems to be with awk thinking that 30exx is a number in scientific 
notation. Take this example:
echo 30e03 99999 | awk '{ print ($1 < $2) ? "true" : "false" }'
prints true
echo 30e04 99999 | awk '{ print ($1 < $2) ? "true" : "false" }'
prints false

To fix this I used the patch attached, which basically adds "0x" in front of 
the numbers to let awk know they are hex numbers.

Original issue reported on code.google.com by ciprian....@linaro.org on 28 Oct 2014 at 2:05

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, thank you for the patch, but please note that this bug was already fixed in 
the 'next' branch. Now the 'next' branch has been merged into master, with tag 
v11.1. Can you please check out the latest code and see if this works for you 
also?

Original comment by giuseppe.lettieri73 on 29 Oct 2014 at 2:28

GoogleCodeExporter commented 9 years ago
I think this is fixed. Please reopen otherwise.

Original comment by giuseppe.lettieri73 on 12 Dec 2014 at 1:19

GoogleCodeExporter commented 9 years ago
The build system changed in v11, it doesn't have this problem because it 
doesn't rely on awk. I suppose it's up to you if you want to have earlier 
versions functional, I got the feeling you are not going to support versions 
prior to v11.

Original comment by ciprian....@linaro.org on 12 Dec 2014 at 5:31