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 7013695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:25:28+00:00 2026-05-27T22:25:28+00:00

I recently built 32-bit Boost 1.48 on a 64-bit machine using gcc 4.5, using

  • 0

I recently built 32-bit Boost 1.48 on a 64-bit machine using gcc 4.5, using these instructions:

./bootstrap.sh --prefix=$INSTALL_PREFIX --exec-prefix=$INSTALL_PREFIX --with-libraries=system,filesystem,python --with-python=python2
./b2 address-model=32 architecture=x86 install

Compilation seems fine and libraries are correctly placed into the installation folder. But when I try to link libboost_filesystem.so to one of my programs I get the following error:

/gpfs/wizard/flight/analysis/mori/GGSINSTALL/install/lib/libboost_filesystem.so: undefined reference to `__sync_fetch_and_add_4'
collect2: ld returned 1 exit status

I manage my code using CMake; these are the flags I use to configure the 32-bit build:

-DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32

I don’t know if I’m doing something wrong in Boost configuration or in my software configuration via CMake flags, but I suspect Boost. I found some discussions on this topic (eg. undefined reference to sync_fetch_and_add_4) but they almost always refer to other architectures like arm or report solutions which I don’t know how to implement in boost build (eg. passing a -march=i486 to gcc, how can this be done with bjam?). Can anybody give me some hints, please? Thanks.

  • 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-05-27T22:25:29+00:00Added an answer on May 27, 2026 at 10:25 pm

    One solution I found is to remove the architecture=x86 flag in b2 invocation. Another working solution is described here: How do I force a 32 bit build of boost with gcc?

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

Sidebar

Related Questions

We recently built a web app using Prototype, making a fair amount of use
I recently started using scons to build several small cross-platform projects. One of these
I recently built a new application using WPF, so that I can learn the
I have a 32-bit Windows/Qt application using Postgres plugin. Recently, I've been intrigued to
I recently reformatted my system from Fedora 15 32 to Fedora 15 64-bit. I
I recently built a project using the Dojo toolkit and loved how you can
I've recently built a demo application using PhoneGap, and I chose to try JQuery
I recently built an API and was often asked to replace the StringCollections I
I recently built a program that parses a remote file from \some_server\c$\directory\file.xls and it
We recently built a large ASP.NET web forms application for a client and the

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.