{"action":"created","issue":{"url":"https://api.github.com/repos/PX4/Firmware/issues/9863","repository_url":"https://api.github.com/repos/PX4/Firmware","labels_url":"https://api.github.com/repos/PX4/Firmware/issues/9863/labels{/name}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/9863/comments","events_url":"https://api.github.com/repos/PX4/Firmware/issues/9863/events","html_url":"https://github.com/PX4/Firmware/issues/9863","id":339294369,"node_id":"MDU6SXNzdWUzMzkyOTQzNjk=","number":9863,"title":"Bug when building the code","user":{"login":"L1ttlewhite","id":28083397,"node_id":"MDQ6VXNlcjI4MDgzMzk3","avatar_url":"https://avatars0.githubusercontent.com/u/28083397?v=4","gravatar_id":"","url":"https://api.github.com/users/L1ttlewhite","html_url":"https://github.com/L1ttlewhite","followers_url":"https://api.github.com/users/L1ttlewhite/followers","following_url":"https://api.github.com/users/L1ttlewhite/following{/other_user}","gists_url":"https://api.github.com/users/L1ttlewhite/gists{/gist_id}","starred_url":"https://api.github.com/users/L1ttlewhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/L1ttlewhite/subscriptions","organizations_url":"https://api.github.com/users/L1ttlewhite/orgs","repos_url":"https://api.github.com/users/L1ttlewhite/repos","events_url":"https://api.github.com/users/L1ttlewhite/events{/privacy}","received_events_url":"https://api.github.com/users/L1ttlewhite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-07-09T03:35:08Z","updated_at":"2018-08-12T07:02:28Z","closed_at":null,"author_association":"NONE","body":"when i trying to buiild the code \r\ni got some errors\r\n\r\nmy gcc version and g++ version is 5.4.0\r\nmy arm-none-eabi-gcc --version is 4.9\r\n\r\nmy error is \r\n\r\n> [  3%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_controls.cpp.obj\r\nIn file included from /home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/NuttX/nuttx/include/math.h:52:0,\r\n                 from /home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/NuttX/nuttx/include/cxx/cmath:46,\r\n                 from /home/alien/Pixhawk/Firmware/src/platforms/px4_defines.h:67,\r\n                 from /home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/msg/topics_sources/actuator_armed.cpp:39:\r\n/home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/NuttX/nuttx/include/arch/math.h:87:20: error: expected initializer before '_PARAMS'\r\n extern double atan _PARAMS((double));\r\n                    ^~~~~~~\r\ncompilation terminated due to -Wfatal-errors.\r\nmake[3]: *** [msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_armed.cpp.obj] Error 1\r\nmake[3]: *** Waiting for unfinished jobs....\r\nIn file included from /home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/NuttX/nuttx/include/math.h:52:0,\r\n                 from /home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/NuttX/nuttx/include/cxx/cmath:46,\r\n                 from /home/alien/Pixhawk/Firmware/src/platforms/px4_defines.h:67,\r\n                 from /home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/msg/topics_sources/actuator_controls.cpp:39:\r\n/home/alien/Pixhawk/Firmware/build/nuttx_px4fmu-v2_default/NuttX/nuttx/include/arch/math.h:87:20: error: expected initializer before '_PARAMS'\r\n extern double atan _PARAMS((double));\r\n                    ^~~~~~~\r\ncompilation terminated due to -Wfatal-errors.\r\nmake[3]: *** [msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_controls.cpp.obj] Error 1\r\n\r\ndoes someone can help me about this error\r\nthank you "},"comment":{"url":"https://api.github.com/repos/PX4/Firmware/issues/comments/412323151","html_url":"https://github.com/PX4/Firmware/issues/9863#issuecomment-412323151","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/9863","id":412323151,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjMyMzE1MQ==","user":{"login":"ProfFan","id":5358374,"node_id":"MDQ6VXNlcjUzNTgzNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5358374?v=4","gravatar_id":"","url":"https://api.github.com/users/ProfFan","html_url":"https://github.com/ProfFan","followers_url":"https://api.github.com/users/ProfFan/followers","following_url":"https://api.github.com/users/ProfFan/following{/other_user}","gists_url":"https://api.github.com/users/ProfFan/gists{/gist_id}","starred_url":"https://api.github.com/users/ProfFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProfFan/subscriptions","organizations_url":"https://api.github.com/users/ProfFan/orgs","repos_url":"https://api.github.com/users/ProfFan/repos","events_url":"https://api.github.com/users/ProfFan/events{/privacy}","received_events_url":"https://api.github.com/users/ProfFan/received_events","type":"User","site_admin":false},"created_at":"2018-08-12T07:02:28Z","updated_at":"2018-08-12T07:02:28Z","author_association":"NONE","body":"Just FYI:\r\nAfter copying _ansi.h manually:\r\n```\r\n$ find . -name '_ansi.h'\r\n./build/nuttx_px4fmu-v4_default/NuttX/nuttx/include/_ansi.h\r\n./platforms/nuttx/NuttX/nuttx/include/_ansi.h\r\n```\r\nWhich suggests that NuttX does not have built-in _ansi.h\r\n```\r\n$ ag _ansi.h\r\nplatforms/nuttx/NuttX/nuttx/arch/arm/include/math.h:\r\n6:#include \"_ansi.h\"\r\n```\r\nHowever PX4 NuttX `math.h` requires `_ansi.h`.\r\n\r\nMeanwhile, in freshly-cloned official NuttX:\r\n```\r\n$ find . -name 'math.h'\r\n./nuttx/include/nuttx/lib/math.h\r\n```\r\nI think there must be some divergence between the official NuttX and the PX4 fork.\r\n\r\nA simple `git blame` shows that `platforms/nuttx/NuttX/nuttx/arch/arm/include/math.h` is added by @dagar and is the only occurrence of `_ansi.h` usage."}}
{"actor":{"display_login":"ProfFan"}}