compile / make file error HELP !!! ?

109 views
Skip to first unread message

Alex Angel

unread,
Jul 24, 2016, 10:55:46 PM7/24/16
to drones-discuss
Hi all,

Anybody an idea ? Trying to compile APM quadcopter with latest nuttx v7.xx
Nuttx part done, PX4 done , APM I think is done ... 

This came up :





 /opt/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include/c++/4.9.3/bits/postypes.h:227:16: error: 'mbstate_t' was not declared in this scope
   typedef fpos<mbstate_t> streampos;
                
compilation terminated due to -Wfatal-errors.
make[3]: *** [uORBDevices_nuttx.cpp.o] Error 1
make[3]: Leaving directory `/home/lexx/ArduPilot/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/home/lexx/ArduPilot/ardupilot/modules/PX4Firmware/src/modules/uORB'
make[2]: *** [/home/lexx/ArduPilot/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build//home/lexx/ArduPilot/ardupilot/modules/PX4Firmware/src/modules/uORB/module.pre.o] Error 2
make[2]: Leaving directory `/home/lexx/ArduPilot/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build'
make[1]: *** [/home/lexx/ArduPilot/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.px4] Error 2
make[1]: Leaving directory `/home/lexx/ArduPilot/ardupilot'
make: *** [px4-v2] Error 2


But

mbstate_t was included in mchar.h file and posttypes.h also include the mchar.h file

Any suggestion or perhaps even HELP would be appreciate 


Greets

Randy Mackay

unread,
Jul 24, 2016, 11:25:39 PM7/24/16
to drones-...@googlegroups.com

Alex,

 

     This is the issue:  https://github.com/ArduPilot/ardupilot/issues/4532

 

     There’s a temporary fix here:  https://github.com/ArduPilot/ardupilot/pull/4528

 

     Sid is working on a new windows toolchain which includes the updated gcc compiler.  I’ve already tested it and it works but we need to fix the directory that it’s installing to and then we will make the new .msi available.

 

-Randy

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lucas De Marchi

unread,
Jul 25, 2016, 6:43:11 AM7/25/16
to drones-discuss

Randy, from what I can see it's totally different issue. He appears to be using Linux and gcc 4.9 which is not affected by that bug.

Alex, if I understood you correctly you are trying to change the nuttx submodule to a different version, is that right?

Lucas De Marchi

Alex Angel

unread,
Jul 25, 2016, 12:25:00 PM7/25/16
to drones-discuss
Hello Lucas,

Yes I'm building apm quadcopter firmware with latest nuttx version. Not just PX4. 
There is a px4 version out there. Im also trying to port APM to work with this latest nuttx since I didn't see any version of APM out there to work with nuttx v7.xx 

Greeets

Op maandag 25 juli 2016 12:43:11 UTC+2 schreef Lucas De Marchi:

Alex Angel

unread,
Jul 26, 2016, 12:18:04 AM7/26/16
to drones-discuss
Hello Randy,

So are you sure this is the problem? Like Lucas mentioned here I'm using linux not windows. Does this also affects the toolchain on linux or what ... ?

greets

Op maandag 25 juli 2016 05:25:39 UTC+2 schreef Randy Mackay:

Randy Mackay

unread,
Jul 26, 2016, 12:36:29 AM7/26/16
to drones-...@googlegroups.com

Alex,

 

     I’m sure Lucas is correct, that I was mixing up the issues.

Alex Angel

unread,
Jul 26, 2016, 1:29:59 AM7/26/16
to drones-discuss
Hy,

Well I don't know who is actually right or not I still didn't solve this. I tried with the different toolchain and still failed.
Lucas wanted to suggest something else .... I guess ....
Any idea ?

Greets

Op dinsdag 26 juli 2016 06:36:29 UTC+2 schreef Randy Mackay:

Lucas De Marchi

unread,
Jul 26, 2016, 10:00:31 AM7/26/16
to drones-discuss
Hi Alex,

We never build with a version of nuttx that is not the one we support
in https://github.com/ArduPilot/PX4Nuttx

Adding support for a newer version of nuttx is nice, but it's not
something we deal with daily. I think the first step would for you to
detail how you are doing it and how we could reproduce it. From your
log it seems to be a toolchain problem, but could be something else.

Lucas De Marchi
Lucas De Marchi

Alex Angel

unread,
Jul 26, 2016, 5:42:46 PM7/26/16
to drones-discuss
Ok so what do you need to know or what do you think the problem is related to?

Before that I had some errors with the I2C frequency .. but solved them,
When trying to build on newest nuttx I got mostly errors related to file structure.

If this error is related to toolchain can somebody please explain to me why ?
Toolchain as far as I know are provided by ARM manufacturer. Why are there different toolchains out there or different versions ?
I can understand you have toolchain for running on linux or windows etc ... But I understand there are different versions out there ? 
Who makes them and why does APM team has anything to do with it ? If its the toolchain for arm cross compile then there should be just 1 PERFECT toolchain available from ST itself.
This part is what really is confusing and don't understand what Randy was saying about this kind of errors and that they need to make a new one ...

greets

Op dinsdag 26 juli 2016 16:00:31 UTC+2 schreef Lucas De Marchi:

Lucas De Marchi

unread,
Jul 26, 2016, 6:27:50 PM7/26/16
to drones-discuss
On Tue, Jul 26, 2016 at 6:29 PM, Alex Angel <angelf...@hotmail.com> wrote:
> Ok so what do you need to know or what do you think the problem is related
> to?

I suggest you to build with the nuttx version we support before trying
to update it to a version we don't. Please follow the wiki on
dev.ardupilot.org on how to build it.


>
> Before that I had some errors with the I2C frequency .. but solved them,
> When trying to build on newest nuttx I got mostly errors related to file
> structure.
>
> If this error is related to toolchain can somebody please explain to me why
> ?

It could be related to toolchain, to nuttx, to px4, to a lot of things
we don't support. We support the nuttx version I pointed out. If you
want to update nuttx you will need to go through all the odds and bugs
that that entails.

> Who makes them and why does APM team has anything to do with it ? If its the
> toolchain for arm cross compile then there should be just 1 PERFECT
> toolchain available from ST itself.

real world vs ideal world. unfortunately it's not like this.


Lucas De Marchi

Alex Angel

unread,
Jul 26, 2016, 8:03:59 PM7/26/16
to drones-discuss
Hello,

Yes thats what Im trying to do, so that's why I asked for help. I do not want to use the older nuttx or the one currently supported. I need to go through with this and I'm very close to the finish.
Can somebody tell me what this error is related to or how to fix it ? Do you know perhaps what this error is for Lucas ? Like I mentioned this question was trying to solve the error not going backwards.



greets

Op woensdag 27 juli 2016 00:27:50 UTC+2 schreef Lucas De Marchi:

Alex Angel

unread,
Jul 31, 2016, 1:09:46 AM7/31/16
to drones-discuss
Hello randy,


could this be the reason why ? 


greets 

Op maandag 25 juli 2016 05:25:39 UTC+2 schreef Randy Mackay:

Alex,

Alex Angel

unread,
Aug 1, 2016, 7:47:45 AM8/1/16
to drones-discuss

Hy,


anybody know where the Makefile is to compile uORB module?

how to add header file in compile option in this uORM module?

greets

Pierre Kancir

unread,
Aug 2, 2016, 8:28:39 AM8/2/16
to drones-discuss
Hi,

I am not sure that uOrb is used in APM, but it use in PX4 flightstack : look here : 
Reply all
Reply to author
Forward
0 new messages