boost build from source code
Hello, bootstrao.sh file on Linux machine create b2 executable (copy it on boost root directory) cd "$pwd" BJAM="$my_dir/tools/build/src/engine/b2" echo "tools/build/src/engine/b2" cp "$BJAM" . Running b2 shows the error ./b2 bash: ./b2: cannot execute binary file: Exec format error Can somebody explain? Thank you, Leonid ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
On Tue, 19 May 2020 at 21:08, Leonid Meyerovich via Boost-users
bash: ./b2: cannot execute binary file: Exec format error
file ./b2 Best regards -- Mateusz Loskot, http://mateusz.loskot.net
Yes, I run 'file' command', it prints a lot of warning like
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 1: Warning: offset `�
' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 1: Warning: type `�
' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 6: Warning: offset `Firmware v' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 6: Warning: type `Firmware v' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 7: Warning: offset `' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 7: Warning: type `' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 8: Warning: offset `' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 8: Warning: type `' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 13: Warning: offset `' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 13: Warning: type `' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 15: Warning: offset `::[ frontEndVersion = ' invalid
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 15: Warning: type `::[ frontEndVersion = ' invalid
but I don't understand why? I have downloaded Linux version of BOOST, it should work, shouldn't it?
________________________________
From: Boost-users
bash: ./b2: cannot execute binary file: Exec format error
file ./b2 Best regards -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
On Tue, 19 May 2020 at 21:31, Leonid Meyerovich
I have downloaded Linux version of BOOST, it should work, shouldn't it?
You say Linux version of Boost, then I take it as binaries. If you download (some) binaries of Boost, and regardless of where they come from, you do not need to run ./bootstrap.sh which does re-build b2 executable. Use b2 from "Linux version of Boost" you downloaded. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
Actually what I am trying to do is to cross-compile BOOST source code to ARM machine.
I have to run ./bootstrap.sh, and then b2.
As far as I understand b2 executable runs on my Linux machine, but 'using gcc' in user-config.jam should point to my cross- compiler
Thanks,
________________________________
From: Boost-users
I have downloaded Linux version of BOOST, it should work, shouldn't it?
You say Linux version of Boost, then I take it as binaries. If you download (some) binaries of Boost, and regardless of where they come from, you do not need to run ./bootstrap.sh which does re-build b2 executable. Use b2 from "Linux version of Boost" you downloaded. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
On Tue, 19 May 2020 at 22:07, Leonid Meyerovich
Actually what I am trying to do is to cross-compile BOOST source code to ARM machine.
I have to run ./bootstrap.sh, and then b2.
Simply, bootstrap.sh does build the b2 executable, so it may not be what you expect or want. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
OK, it make sense.
Thank you
-----Original Message-----
From: Boost-users
Actually what I am trying to do is to cross-compile BOOST source code to ARM machine.
I have to run ./bootstrap.sh, and then b2.
Simply, bootstrap.sh does build the b2 executable, so it may not be what you expect or want. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
вт, 19 мая 2020 г., 22:31 Leonid Meyerovich via Boost-users < boost-users@lists.boost.org>:
Yes, I run 'file' command', it prints a lot of warning like
/home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 1: Warning: offset ` �
' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 1: Warning: type ` �
' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 6: Warning: offset `Firmware v' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 6: Warning: type `Firmware v' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 7: Warning: offset ` ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 7: Warning: type ` ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 8: Warning: offset ` ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 8: Warning: type ` ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 13: Warning: offset ` ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 13: Warning: type ` ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 15: Warning: offset `::[ frontEndVersion = ' invalid /home/lm/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/share/misc/magic.mgc, 15: Warning: type `::[ frontEndVersion = ' invalid
but I don't understand why? I have downloaded Linux version of BOOST, it should work, shouldn't it?
Looks like you build b2 with oe cross-compiler toolchain. Check your path environment variable. You're using wrong gcc/g++.
You are right, I do have arm cross-compiler installed.
But I though that 'b2' executable is a part of the package that I downloaded from BOOST site and this executable is built for x86 machine.
Running 'bootstrap.sh' copy this file to boost_root folder, am I wrong?
Thanks,
________________________________
From: Sergei Nikulov
On Tue, May 19, 2020 at 11:02 PM Leonid Meyerovich
You are right, I do have arm cross-compiler installed. But I though that 'b2' executable is a part of the package that I downloaded from BOOST site and this executable is built for x86 machine. Running 'bootstrap.sh' copy this file to boost_root folder, am I wrong?
Thanks, ________________________________
No. You've downloaded the source code package. So have following options 1. Build b2 for the host, then edit project-build.jam to build boost libs for the target. (for ex: https://www.cnx-software.com/2011/10/03/cross-compiling-boost-c-libraries-fo...) 2. Since you've used OE SDK (it's Yocto project I think), enable boost recipe in OE bitbake to build your SDK with boost libs. Then you'll be able to use it from SDK sysroot. The latter option is preferred and more natural for your embedded target unless you need a bleeding-edge boost version. -- Best Regards, Sergei Nikulov
Thank you for your explanation.
BTW, I am editing user-config.jam, is it right way to edit project-build.jam?
I have already embedded Linux install on my target, so I am not building the whole system.
I may need to build an application (cross-compile) and move it to the target (maybe with some library, is it will be difficult to link statically)
Thanks,
Leonid
________________________________
From: Sergei Nikulov
You are right, I do have arm cross-compiler installed. But I though that 'b2' executable is a part of the package that I downloaded from BOOST site and this executable is built for x86 machine. Running 'bootstrap.sh' copy this file to boost_root folder, am I wrong?
Thanks, ________________________________
No. You've downloaded the source code package. So have following options 1. Build b2 for the host, then edit project-build.jam to build boost libs for the target. (for ex: https://www.cnx-software.com/2011/10/03/cross-compiling-boost-c-libraries-fo...) 2. Since you've used OE SDK (it's Yocto project I think), enable boost recipe in OE bitbake to build your SDK with boost libs. Then you'll be able to use it from SDK sysroot. The latter option is preferred and more natural for your embedded target unless you need a bleeding-edge boost version. -- Best Regards, Sergei Nikulov ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
On Wed, May 20, 2020 at 4:00 PM Leonid Meyerovich
Thank you for your explanation. BTW, I am editing user-config.jam, is it right way to edit project-build.jam?
I see no problem with it. Ref to https://boostorg.github.io/build/manual/master/index.html#bbv2.overview.conf... to understand more about those files.
I have already embedded Linux install on my target, so I am not building the whole system.
It just a matter of handling dependencies. If it required for target, Boost libraries can be included in SDK. Another option - drop Boost and replace it with something more lightweight. If it's not possible, then go ahead with cross-compiling and static linking.
I may need to build an application (cross-compile) and move it to the target (maybe with some library, is it will be difficult to link statically)
Thanks, Leonid ________________________________ From: Sergei Nikulov
Sent: Wednesday, May 20, 2020 7:28 AM To: Leonid Meyerovich Cc: boost-users@lists.boost.org Subject: Re: [Boost-users] boost build from source code On Tue, May 19, 2020 at 11:02 PM Leonid Meyerovich
wrote: You are right, I do have arm cross-compiler installed. But I though that 'b2' executable is a part of the package that I downloaded from BOOST site and this executable is built for x86 machine. Running 'bootstrap.sh' copy this file to boost_root folder, am I wrong?
Thanks, ________________________________
No. You've downloaded the source code package.
So have following options 1. Build b2 for the host, then edit project-build.jam to build boost libs for the target. (for ex: https://www.cnx-software.com/2011/10/03/cross-compiling-boost-c-libraries-fo...) 2. Since you've used OE SDK (it's Yocto project I think), enable boost recipe in OE bitbake to build your SDK with boost libs. Then you'll be able to use it from SDK sysroot.
The latter option is preferred and more natural for your embedded target unless you need a bleeding-edge boost version.
-- Best Regards, Sergei Nikulov
________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
-- Best Regards, Sergei Nikulov
Thank you, i'll try to move forward 🙂
Leonid
________________________________
From: Sergei Nikulov
Thank you for your explanation. BTW, I am editing user-config.jam, is it right way to edit project-build.jam?
I see no problem with it. Ref to https://boostorg.github.io/build/manual/master/index.html#bbv2.overview.conf... to understand more about those files.
I have already embedded Linux install on my target, so I am not building the whole system.
It just a matter of handling dependencies. If it required for target, Boost libraries can be included in SDK. Another option - drop Boost and replace it with something more lightweight. If it's not possible, then go ahead with cross-compiling and static linking.
I may need to build an application (cross-compile) and move it to the target (maybe with some library, is it will be difficult to link statically)
Thanks, Leonid ________________________________ From: Sergei Nikulov
Sent: Wednesday, May 20, 2020 7:28 AM To: Leonid Meyerovich Cc: boost-users@lists.boost.org Subject: Re: [Boost-users] boost build from source code On Tue, May 19, 2020 at 11:02 PM Leonid Meyerovich
wrote: You are right, I do have arm cross-compiler installed. But I though that 'b2' executable is a part of the package that I downloaded from BOOST site and this executable is built for x86 machine. Running 'bootstrap.sh' copy this file to boost_root folder, am I wrong?
Thanks, ________________________________
No. You've downloaded the source code package.
So have following options 1. Build b2 for the host, then edit project-build.jam to build boost libs for the target. (for ex: https://www.cnx-software.com/2011/10/03/cross-compiling-boost-c-libraries-fo...) 2. Since you've used OE SDK (it's Yocto project I think), enable boost recipe in OE bitbake to build your SDK with boost libs. Then you'll be able to use it from SDK sysroot.
The latter option is preferred and more natural for your embedded target unless you need a bleeding-edge boost version.
-- Best Regards, Sergei Nikulov
________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
-- Best Regards, Sergei Nikulov ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
After I have properly built B2 and run it with my toolset (embedded arm)
arm-oe-linux-gnueabi-g++ (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
I've got the following error:
...
- type_erasure : building
- wave : building
...patience...
...patience...
...patience...
...patience...
...patience...
...found 12065 targets...
...updating 902 targets...
gcc.compile.c++ bin.v2/libs/serialization/build/gcc-arm/release/threading-multi/visibility-hidden/basic_archive.o
In file included from ./boost/config.hpp:39:0,
from ./boost/serialization/config.hpp:18,
from libs/serialization/src/basic_archive.cpp:35:
./boost/config/compiler/gcc.hpp:165:19: fatal error: cstddef: No such file or directory
#include <cstddef>
^
compilation terminated.
Apparently my version arm-oe-linux-gnueabi-g++ (GCC) 4.9.2 doesn't contain cstddef.hpp header file (this version has been installed as a part of gnu radio)
I may try install a newer version (6.x.x), but I don't know where I can get it?
Any idea?
Thank you,
-----Original Message-----
From: Sergei Nikulov
Thank you for your explanation. BTW, I am editing user-config.jam, is it right way to edit project-build.jam?
I see no problem with it. Ref to https://boostorg.github.io/build/manual/master/index.html#bbv2.overview.conf... to understand more about those files.
I have already embedded Linux install on my target, so I am not building the whole system.
It just a matter of handling dependencies. If it required for target, Boost libraries can be included in SDK. Another option - drop Boost and replace it with something more lightweight. If it's not possible, then go ahead with cross-compiling and static linking.
I may need to build an application (cross-compile) and move it to the target (maybe with some library, is it will be difficult to link statically)
Thanks, Leonid ________________________________ From: Sergei Nikulov
Sent: Wednesday, May 20, 2020 7:28 AM To: Leonid Meyerovich Cc: boost-users@lists.boost.org Subject: Re: [Boost-users] boost build from source code On Tue, May 19, 2020 at 11:02 PM Leonid Meyerovich
wrote: You are right, I do have arm cross-compiler installed. But I though that 'b2' executable is a part of the package that I downloaded from BOOST site and this executable is built for x86 machine. Running 'bootstrap.sh' copy this file to boost_root folder, am I wrong?
Thanks, ________________________________
No. You've downloaded the source code package.
So have following options 1. Build b2 for the host, then edit project-build.jam to build boost libs for the target. (for ex: https://www.cnx-software.com/2011/10/03/cross-compiling-boost-c-librar ies-for-arm/) 2. Since you've used OE SDK (it's Yocto project I think), enable boost recipe in OE bitbake to build your SDK with boost libs. Then you'll be able to use it from SDK sysroot.
The latter option is preferred and more natural for your embedded target unless you need a bleeding-edge boost version.
-- Best Regards, Sergei Nikulov
________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
-- Best Regards, Sergei Nikulov ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
On Wed, May 20, 2020 at 8:21 PM Leonid Meyerovich
After I have properly built B2 and run it with my toolset (embedded arm)
arm-oe-linux-gnueabi-g++ (GCC) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc.
I've got the following error:
... - type_erasure : building - wave : building
...patience... ...patience... ...patience... ...patience... ...patience... ...found 12065 targets... ...updating 902 targets... gcc.compile.c++ bin.v2/libs/serialization/build/gcc-arm/release/threading-multi/visibility-hidden/basic_archive.o In file included from ./boost/config.hpp:39:0, from ./boost/serialization/config.hpp:18, from libs/serialization/src/basic_archive.cpp:35: ./boost/config/compiler/gcc.hpp:165:19: fatal error: cstddef: No such file or directory #include <cstddef> ^ compilation terminated.
Apparently my version arm-oe-linux-gnueabi-g++ (GCC) 4.9.2 doesn't contain cstddef.hpp header file (this version has been installed as a part of gnu radio)
I may try install a newer version (6.x.x), but I don't know where I can get it?
Any idea?
It's hard to advise something here without any detailed knowledge of your task/process/environment. I've never seen this problem before because I've never used toolchain from gnu radio. Sorry.
Thank you,
-- Best Regards, Sergei Nikulov
This is versioning problem.
Finally, I have downloaded an older version of BOOST (1.46.1) and have built it
Thank you,
-----Original Message-----
From: Sergei Nikulov
After I have properly built B2 and run it with my toolset (embedded arm)
arm-oe-linux-gnueabi-g++ (GCC) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc.
I've got the following error:
... - type_erasure : building - wave : building
...patience... ...patience... ...patience... ...patience... ...patience... ...found 12065 targets... ...updating 902 targets... gcc.compile.c++ bin.v2/libs/serialization/build/gcc-arm/release/threading-multi/visibi lity-hidden/basic_archive.o In file included from ./boost/config.hpp:39:0, from ./boost/serialization/config.hpp:18, from libs/serialization/src/basic_archive.cpp:35: ./boost/config/compiler/gcc.hpp:165:19: fatal error: cstddef: No such file or directory #include <cstddef> ^ compilation terminated.
Apparently my version arm-oe-linux-gnueabi-g++ (GCC) 4.9.2 doesn't contain cstddef.hpp header file (this version has been installed as a part of gnu radio)
I may try install a newer version (6.x.x), but I don't know where I can get it?
Any idea?
It's hard to advise something here without any detailed knowledge of your task/process/environment. I've never seen this problem before because I've never used toolchain from gnu radio. Sorry.
Thank you,
-- Best Regards, Sergei Nikulov ________________________________ This message and all attachments are PRIVATE, and contain information that is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to transmit or otherwise disclose this message or any attachments to any third party whatsoever without the express written consent of Intelligent Automation, Inc. If you received this message in error or you are not willing to view this message or any attachments on a confidential basis, please immediately delete this email and any attachments and notify Intelligent Automation, Inc.
participants (3)
-
Leonid Meyerovich
-
Mateusz Loskot
-
Sergei Nikulov