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

  • Home
  • SEARCH
  • 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 8971119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:52:46+00:00 2026-06-15T17:52:46+00:00

I’m trying to build an static-linked GNU x86 binary on an 64bit CentOS system

  • 0

I’m trying to build an static-linked GNU x86 binary on an 64bit CentOS system using the automake configure script. I am able able to build a static 64bit binary and a dynamic 32bit with no problems but I can’t seem to figure out how to build a static 32bit binary.

I’ve tried the following configure command:

./configure --build=i686-pc-linux-gnu CFLAGS='-static -m32' CXXFLAGS='-static -m32'

But I get the following error message:

# ./configure --build=i686-pc-linux-gnu CFLAGS='-static -m32' CXXFLAGS='-static -m32'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/tmp/iperf-2.0.5':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.

If I try to build just a 32bit binary passing -m32 to CFLAGS, CXXFLAGS and LDFLAGS, it works fine.

From the config.log file, I see:

configure:3104: $? = 1
configure:3124: checking whether the C++ compiler works
configure:3146: g++ -static -m32   conftest.cpp  >&5
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

But I have both the 32 and 64bit versions of libstdc++ installed.

Any suggestions?

  • 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-15T17:52:49+00:00Added an answer on June 15, 2026 at 5:52 pm

    For a typical autotools configure, assuming that libtool is integrated, try:

    > env CFLAGS="[OPT] -m32" CXXFLAGS="[OPT] -m32" \
      ./configure --host=i686-pc-linux-gnu --enable-static [--disable-shared]
    

    where OPT is other compiler flags, e.g., -O2, etc.

    The explicit use of -static in $CFLAGS, $CXXFLAGS is probably not doing what you want.

    Edit: It might actually be necessary to use: CC="gcc -m32", CXX="g++ -m32" (depending on the compiler) for the required mode to carry through to the link stage. I have encountered this before with other packages.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a small JavaScript validation script that validates inputs based on Regex. I

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.