Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8214399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:26:57+00:00 2026-06-07T11:26:57+00:00

I am trying to install boost 1.5 into android according to this . When

  • 0

I am trying to install boost 1.5 into android according to this.

When I compile, I get an error. Here is a fragment of the compilation error:

gcc.compile.c++ bin.v2/libs/thread/build/gcc-android4.4.3/release/link-static/runtime-link-    static/threading-multi/pthread/thread.o
<command-line>: warning: "BOOST_FILESYSTEM_VERSION" redefined
<command-line>: warning: this is the location of the previous definition
In file included from ./boost/thread/thread.hpp:17,
             from libs/thread/src/pthread/thread.cpp:11:
./boost/thread/pthread/thread_data.hpp: In member function 'void    boost::thread_attributes::set_stack_size(size_t)':
./boost/thread/pthread/thread_data.hpp:42: error: 'PAGE_SIZE' was not declared in this scope

"../../toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pedantic --sysroot=../../platforms/android-9/arch-arm -mthumb -Os -fno-strict-aliasing -O2 -DNDEBUG -g -lstdc++ -I../../sources/cxx-stl/gnu-libstdc++/include -I../../sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -D__GLIBC__ -DBOOST_NO_INTRINSIC_WCHAR_T -DBOOST_FILESYSTEM_VERSION=2 -pthread -Wextra -Wno-long-long -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_POSIX -DNDEBUG  -I"." -c -o "bin.v2/libs/thread/build/gcc-android4.4.3/release/link-static/runtime-link-static/threading-multi/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"

...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-android4.4.3/release/link-static/runtime-link-static/threading-multi/pthread/thread.o...

I found this error which I didn’t understand …

./boost/thread/pthread/thread_data.hpp:42: error: 'PAGE_SIZE' was not declared in this scope. It says PAGE_SIZE was not declared, but I have no idea what that means. And when I tried to look at that particular location in the code I did not find PAGE_SIZE.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:27:00+00:00Added an answer on June 7, 2026 at 11:27 am

    Compilation errors like this are typically resolved by looking first at the preprocessed output. Try replacing -c with -E and changing the foo.o to foo.pp (or something else) and review the foo.pp file for errors (search for set_stack_size).

    This is the relevant code:

            void set_stack_size(std::size_t size) BOOST_NOEXCEPT {
              if (size==0) return;
              std::size_t page_size = getpagesize();
    #ifdef PTHREAD_STACK_MIN
              if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
    #endif
              size = ((size+page_size-1)/page_size)*page_size;
    

    getpagesize() expands to something which references PAGE_SIZE. I’m pretty sure sysconf is the Right Way ™ to get the page size these days, but the boost maintainers might’ve had a good reason for using getpagesize(). Regardless, you can dodge this specific error with a -DPAGE_SIZE=2048 compiler argument, or whatever your target’s page size is. Either that, or patch the source to use sysconf(_SC_PAGESIZE) instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to install mysql2 gem on ruby 1.9.2 and I get this error: Installing
Trying to install pear package and keep getting this strange error. Can you shed
I am trying to install the Boost C++ libraries using these instructions . This
I am trying to install Boost so I can use it along with MinGW
I am trying: install.packages(RGoogleDocs, repos = http://www.omegahat.org/R) As suggested here , but it doesn't
Trying to install Scrapy on Mac OSX 10.6 using this guide : When running
When trying to install the ADT plugin following Android Developper Site' instructions on a
I am trying to install Boost on an unix cluster machine following the Boost
I am trying to compile the latest Boost c++ libraries for Centos. I 've
I am trying to install mrtg on boot. apt-get install mrtg is the required

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.