Hi
Spelling mistake : BR2_PACKAGE_IW
This error was hidden by my test configuration which has this option selected
I will fix this this
2013/2/8 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> On 02/08/2013 01:16 PM, Laurent Cans wrote:>>> + select BR2_PACKAGE_WI>> WI?> There's no such package in buildroot.> And it's not in DEPENDENCIES either...> Regards.>

On 08/02/13 16:32, Thomas Petazzoni wrote:
> Dear Laurent Cans,>> Thanks, this looks pretty good; A few comments below.
Yep, don't be discouraged by the large amount of feedback :-)
> On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote:>> Aircrack-ng is a set of tools for auditing wireless security.>>>> Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation.
It would be good to repeat this comment in the .mk file. That helps to
see if a certain packaged upstream version is in fact more recent than
what is already there.
[snip]
>> +ifeq($(BR2_PACKAGE_SQLITE),y)>> + AIRCRACK_NG_OPTS = sqlite=true
I prefer AIRCRACK_NG_MAKE_OPTS.
>> + AIRCRACK_NG_DEPENDENCIES += sqlite>> +endif
I would add an else branch that explicitly sets sqlite=false, to make
sure it doesn't leak in through the environment.
>> The src/Makefile contains:>> ifeq ($(subst TRUE,true,$(filter TRUE true,$(sqlite) $(SQLITE))),true)> LIBSQL = -L/usr/local/lib -lsqlite3> else> LIBSQL => endif>> This -L/usr/local/lib isn't really nice since this is not where sqlite> will be installed, and it may cause issues when cross-compiling.
The solution is simple:
AIRCRACK_NG_MAKE_OPTS += LIBSQL="-lsqlite3"
(no -L is needed because libsqlite3.a is in the default library search path).
>>> +>> +define AIRCRACK_NG_BUILD_CMDS>> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all>> +endef>> Use $(TARGET_CONFIGURE_OPTS) :>> $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all
If it works, I prefer to put the TARGET_CONFIGURE_OPTS in the
environment instead:
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all
That gives the Makefile the possibility to append to CFLAGS and LDFLAGS,
if necessary. However, some Makefiles unconditionally set CFLAGS or
LDFLAGS (or even CC), in that case passing through the environment
doesn't work.
Regards,
Arnout
> And ditto for the other commands.>> Best regards,>> Thomas>

Hi Laurent
9.2.2013 0:38, Laurent CANS kirjoitti:
> 2013/2/8 Stefan Fröberg <stefan.froberg@petroprogram.com>:>> Hi Laurent>>>> You mean 1.1 did not compile with latest buildroot ?> I faced a problem with gcc4.5 referenced by the project with this issue :>> http://trac.aircrack-ng.org/ticket/762
Hmmm... I could swear that I was using 4.5 when compiling that 1.1
version ages ago. But i tried compiling
it with only 32-bit x86 target.
Regards
Stefan

9.2.2013 13:36, Stefan Fröberg kirjoitti:
> Hi Laurent>> 9.2.2013 0:38, Laurent CANS kirjoitti:>> 2013/2/8 Stefan Fröberg <stefan.froberg@petroprogram.com>:>>> Hi Laurent>>>>>> You mean 1.1 did not compile with latest buildroot ?>> I faced a problem with gcc4.5 referenced by the project with this issue :>>>> http://trac.aircrack-ng.org/ticket/762
Ah, but now I see it.
That -Werror thing.
I always define -Wno-error in my buildroot CFLAGS because
I hate it when people think that their code is perfect (it newer is, and
neither is my code) and
stop compiling because warnings.
That's why my compilationg with 4.5 succeeded.
So lil patch to makefile to get rid of that Werror thing should be good
to get it compiled
with any gcc.
Regards
Stefan
> Hmmm... I could swear that I was using 4.5 when compiling that 1.1> version ages ago. But i tried compiling> it with only 32-bit x86 target.>> Regards> Stefan>>> _______________________________________________> buildroot mailing list> buildroot@busybox.net> http://lists.busybox.net/mailman/listinfo/buildroot

Dear Stefan Fröberg,
On Sat, 09 Feb 2013 13:45:39 +0200, Stefan Fröberg wrote:
> Ah, but now I see it.> That -Werror thing.> I always define -Wno-error in my buildroot CFLAGS because> I hate it when people think that their code is perfect (it newer is,> and neither is my code) and> stop compiling because warnings.> That's why my compilationg with 4.5 succeeded.
Indeed, if the reason the compilation fails is because of -Werror, then
remove -Werror from the compilation flags, and use the stable 1.1
release rather than the SVN version.
Best regards,
Thomas

Hi Thomas
9.2.2013 14:01, Thomas Petazzoni kirjoitti:
> Dear Stefan Fröberg,>> On Sat, 09 Feb 2013 13:45:39 +0200, Stefan Fröberg wrote:>>> Ah, but now I see it.>> That -Werror thing.>> I always define -Wno-error in my buildroot CFLAGS because>> I hate it when people think that their code is perfect (it newer is,>> and neither is my code) and>> stop compiling because warnings.>> That's why my compilationg with 4.5 succeeded.> Indeed, if the reason the compilation fails is because of -Werror, then> remove -Werror from the compilation flags, and use the stable 1.1> release rather than the SVN version.>> Best regards,>> Thomas
I Agree.
It's always good to take the latest stable version (if there is any) as
starting point and included in buildroot.
And after that is kosher, then maybe go for the latest and greatest
bleeding edge version.
Regards
Stefan

Arnout, Thomas,
I tried to use $(TARGET_CONFIGURE_OPTS) passed by variable or by
environment but the 2 methods fails.
What is the correct methode to handle this?
- Correct package makefiles
- Don't use $(TARGET_CONFIGURE_OPTS) but CC and LD fixed by variable
- Another solution
Best regards,
Laurent
2013/2/8 Arnout Vandecappelle <arnout@mind.be>:
> On 08/02/13 16:32, Thomas Petazzoni wrote:>>>> Dear Laurent Cans,>>>> Thanks, this looks pretty good; A few comments below.>>> Yep, don't be discouraged by the large amount of feedback :-)>>>> On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote:>>>>>> Aircrack-ng is a set of tools for auditing wireless security.>>>>>> Although the last version is 1.1, I choose to package last svn version>>> due to a fixed bug which fix a failed compilation.>>> It would be good to repeat this comment in the .mk file. That helps to see> if a certain packaged upstream version is in fact more recent than what is> already there.>> [snip]>>>> +ifeq($(BR2_PACKAGE_SQLITE),y)>>> + AIRCRACK_NG_OPTS = sqlite=true>>> I prefer AIRCRACK_NG_MAKE_OPTS.>>>>> + AIRCRACK_NG_DEPENDENCIES += sqlite>>> +endif>>> I would add an else branch that explicitly sets sqlite=false, to make sure> it doesn't leak in through the environment.>>>>>> The src/Makefile contains:>>>> ifeq ($(subst TRUE,true,$(filter TRUE true,$(sqlite) $(SQLITE))),true)>> LIBSQL = -L/usr/local/lib -lsqlite3>> else>> LIBSQL =>> endif>>>> This -L/usr/local/lib isn't really nice since this is not where sqlite>> will be installed, and it may cause issues when cross-compiling.>>> The solution is simple:>> AIRCRACK_NG_MAKE_OPTS += LIBSQL="-lsqlite3">> (no -L is needed because libsqlite3.a is in the default library search> path).>>>>>>> +>>> +define AIRCRACK_NG_BUILD_CMDS>>> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)>>> $(AIRCRACK_NG_OPTS) all>>> +endef>>>>>> Use $(TARGET_CONFIGURE_OPTS) :>>>> $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all>>> If it works, I prefer to put the TARGET_CONFIGURE_OPTS in the environment> instead:>> $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all>> That gives the Makefile the possibility to append to CFLAGS and LDFLAGS, if> necessary. However, some Makefiles unconditionally set CFLAGS or LDFLAGS (or> even CC), in that case passing through the environment doesn't work.>>> Regards,> Arnout>>>>> And ditto for the other commands.>>>> Best regards,>>>> Thomas>>>>> --> Arnout Vandecappelle arnout at mind be> Senior Embedded Software Architect +32-16-286500> Essensium/Mind http://www.mind.be> G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle> GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

On 10/02/13 16:08, Laurent CANS wrote:
> Arnout, Thomas,>> I tried to use $(TARGET_CONFIGURE_OPTS) passed by variable or by> environment but the 2 methods fails.>> What is the correct methode to handle this?> - Correct package makefiles> - Don't use $(TARGET_CONFIGURE_OPTS) but CC and LD fixed by variable> - Another solution>> Best regards,>> Laurent
Laurent,
First of all, please don't top-post, but cut down the quoted message to
the relevant parts and reply under them, like below.
>> 2013/2/8 Arnout Vandecappelle <arnout@mind.be>:>> On 08/02/13 16:32, Thomas Petazzoni wrote:>>> On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote:
[snip]
>>>> +>>>> +define AIRCRACK_NG_BUILD_CMDS>>>> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)>>>> $(AIRCRACK_NG_OPTS) all>>>> +endef>>>>>>>>> Use $(TARGET_CONFIGURE_OPTS) :>>>>>> $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all>>>>>> If it works, I prefer to put the TARGET_CONFIGURE_OPTS in the environment>> instead:>>>> $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all>>>> That gives the Makefile the possibility to append to CFLAGS and LDFLAGS, if>> necessary. However, some Makefiles unconditionally set CFLAGS or LDFLAGS (or>> even CC), in that case passing through the environment doesn't work.
If setting $(TARGET_CONFIGURE_OPTS) in the environment doesn't work,
then you can try setting it on the command line instead. If that doesn't
work either, it indicates that something funny is done in the Makefile
and it's important to find out what exactly. Probably it's a matter of
CFLAGS or LDFLAGS that need to be set, but are now overridden from the
command line.
In that case, the best option is to fix the Makefile (and upstream the
fix). A less preferred option is something like:
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
CC="$(TARGET_CC)" LD="$(TARGET_LD)" $(AIRCRACK_NG_MAKE_OPTS) all
i.e. use the command line to force CC and LD and pass the things that the
Makefile needs to have control over (CFLAGS and LDFLAGS) through the
environment.
Regards,
Arnout