This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problems building gcc-4.3.5-1 on AIX 6.1 with pthreads


Going to top-post to perhaps close this out.

Thank you, David! The information you provided is extremely helpful. I
was beginning to suspect that building the compiler with pthreads was
orthogonal to the problem. Your explanations helped clarify that issue
and to avoid other problems. Rolling it up for anyone that might find
this thread:

 --trying to inject pthreads into the bootstrap process is wrong
 --trying to use pthread in CFLAGS is wrong
 --gcc has pthread support for AIX without the need to be built itself
with pthreads
 --do not use binutils for AIX (the O/S specific docs trump the
general build instructions)
 --avoid statically linking as it can introduce exception handling
problems in C++.

Thanks again,
  -Rick

On Fri, Oct 26, 2012 at 5:44 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> On Fri, Oct 26, 2012 at 2:12 PM, Rick Springob <rspringob@gmail.com> wrote:
>
>> I do not understand the relationship to binutils to gcc either. The
>> build instructions for gcc list binutils as a pre-requisite. Elsewhere
>> in the build instructions, you are told to use the native linker and
>> other tools rather than the binutil versions.  In the configure
>> script, there is an option for specifying binutils. Why is it there a
>> configuration option if it should not be used? In any case, binutils
>> are not in my path. Thus, configure does not use them. I do not think
>> that this is contributing to the current problem.
>
> Binutils does not work correctly on AIX 5, AIX 6 or AIX 7.  Do not use
> it.  Do not set extra options about which as and ld to use.  Simply
> ensure that /opt/freeware/bin/as and .../ld are not in your patch.
>
>> Regarding static, I am looking to build a compiler that can be used in
>> a common toolchain shared among build hosts. This ensures that the
>> compiler will behave consistently on various hosts rather than being
>> subject to the variability of the shared objects on each system. When
>> a machine hangs around for years, for example, expanding the build
>> farm with an exact replica of hardware and software becomes
>> increasingly difficult as time marches on.
>
> C++ and Exception handling will not work correctly with static
> libraries on AIX.  One also will encounter missing symbols that are
> provided by libsupc++.
>
>> For the threading option, we have a bug that appeared when we started
>> using a new version of the gcc compiler. We were forced to move to a
>> new compiler when we found that we could not replace the ancient
>> hardware.The new hardware did not support the old O/S. The new version
>> of AIX did not support the old gcc compiler. We installed 4.3.5 via
>> RPM.
>
> If you want to use pre-built GCC, I strongly recommend using the ones
> from http://www.perzl.org/aix/ and NOT the AIX Toolbox for Linux.
>
>> The current suspect of the bug is the aix threading model. The same
>> code executes fine on 6 other flavors of unix that are built with gcc
>> using posix threads. Even if the bug turns out not to be due to the
>> threading model, eliminating the suspect or seeing a different symptom
>> may help to figure it out.
>
>> I wish we could simplify. But, circumstances are preventing us from
>> taking the easy path.
>>
>> So, pthreads are not supported on AIX? Or, is there some way to
>> convince 'configure' how to use pthreads without using a CFLAGS? The
>> enable-threads=posix option seems to be the right way to do it but it
>> is obviously not working.
>
> Pthreads are supported on AIX. Again, STOP adding it to the GCC
> configure command line.  Do not mention --enabled-threads on the GCC
> configure command line.  Do not write posix on the GCC configure
> command line.  How many ways to I need to write this?
>
> GCC builds on AIX with pthreads support by default.  One simply
> invokes GCC with "-pthread" at compile time.  The support is there.
> Just stop trying to explicitly enable it when you configure GCC.
> Because of some AIX complexity, the thread support is slightly more
> complicated and enabling "posix" is wrong.  Your extra options are
> causing you all of your problems building GCC.
>
> - David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]