Bug 46026 - [trans-mem] Unable to build libitm on Solaris/x86
Summary: [trans-mem] Unable to build libitm on Solaris/x86
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libitm (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Alexandre Oliva
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 18:53 UTC by Mike Spear
Modified: 2012-01-11 22:49 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-11-18 12:02:26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Spear 2010-10-14 18:53:33 UTC
I am unable to build the transactional-memory branch on Solaris/x86.  I'm using the exact same configuration as for my local gcc 4.5.1 install.

Build Environment (gcc -v):
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/proj/spear0/gcc451/libexec/gcc/i386-pc-solaris2.10/4.5.1/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: /proj/spear0/gcc451src/gcc-4.5.1/configure --prefix=/proj/spear0/gcc451 --enable-languages=c,c++ --with-mpfr=/proj/spear0/x86 --with-gmp=/proj/spear0/x86/ --with-mfs=/proj/spear0/x86 --with-gnu-as --with-as=/proj/spear0/binutils-2.20.1/bin/as --with-gnu-ld --with-ld=/proj/spear0/binutils-2.20.1/bin/ld
Thread model: posix
gcc version 4.5.1 (GCC)

Configure:
../transactional-memory/configure --prefix=/proj/spear1/gcc_stm/gcc-stm --with-gnu-as --with-as=/proj/spear0/binutils-2.20.1/bin/as --with-gnu-ld --with-ld=/proj/spear0/binutils-2.20.1/bin/ld --enable-languages=c,c++ --with-mpfr=/proj/spear0/x86/ --with-gmp=/proj/spear0/x86/ --with-mpc=/proj/spear0/x86/ --program-prefix=stm-

I encountered two errors in the libitm folder:

First, I ran into trouble due to target.h not being found:

<output>
libtool: compile:  /proj/spear1/gcc_stm/build/./gcc/g++ -B/proj/spear1/gcc_stm/build/./gcc/ -nostdinc++ -nostdinc++ -I/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/include -I/proj/spear1/gcc_stm/transactional-memory/libstdc++-v3/libsupc++ -I/proj/spear1/gcc_stm/transactional-memory/libstdc++-v3/include/backward -I/proj/spear1/gcc_stm/transactional-memory/libstdc++-v3/testsuite/util -L/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/src -L/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/src/.libs -B/proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/bin/ -B/proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/lib/ -isystem /proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/include -isystem /proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/sys-include -DHAVE_CONFIG_H -I. -I../../../transactional-memory/libitm -I../../../transactional-memory/libitm/config/i386 -I../../../transactional-memory/libitm/config/posix -I../../../transactional-memory/libitm/config/generic -I../../../transactional-memory/libitm -std=gnu++0x -funwind-tables -fno-exceptions -fno-rtti -Wall -pthread -Werror -fabi-version=4 -g -O2 -MT aatree.lo -MD -MP -MF .deps/aatree.Tpo -c ../../../transactional-memory/libitm/aatree.cc  -fPIC -DPIC -o .libs/aatree.o
In file included from ../../../transactional-memory/libitm/aatree.cc:28:0:
../../../transactional-memory/libitm/libitm_i.h:79:20: fatal error: target.h: No such file or directory
compilation terminated.
gmake[4]: *** [aatree.lo] Error 1
</output>

It would seem that libitm/config/x86/target.h is the desired target, given the characteristics of my system (Solaris/x86), so I ran the following:

echo '#include "config/x86/target.h"' >> ../transactional-memory/libitm/target.h

I then cleaned the build tree and started again.

This time, I encountered the following error:

<output>
libtool: compile:  /proj/spear1/gcc_stm/build/./gcc/g++ -B/proj/spear1/gcc_stm/build/./gcc/ -nostdinc++ -nostdinc++ -I/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/include -I/proj/spear1/gcc_stm/transactional-memory/libstdc++-v3/libsupc++ -I/proj/spear1/gcc_stm/transactional-memory/libstdc++-v3/include/backward -I/proj/spear1/gcc_stm/transactional-memory/libstdc++-v3/testsuite/util -L/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/src -L/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libstdc++-v3/src/.libs -B/proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/bin/ -B/proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/lib/ -isystem /proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/include -isystem /proj/spear1/gcc_stm/gcc-stm/i386-pc-solaris2.10/sys-include -DHAVE_CONFIG_H -I. -I../../../transactional-memory/libitm -I../../../transactional-memory/libitm/config/i386 -I../../../transactional-memory/libitm/config/posix -I../../../transactional-memory/libitm/config/generic -I../../../transactional-memory/libitm -std=gnu++0x -funwind-tables -fno-exceptions -fno-rtti -Wall -pthread -Werror -fabi-version=4 -g -O2 -MT rwlock.lo -MD -MP -MF .deps/rwlock.Tpo -c ../../../transactional-memory/libitm/config/posix/rwlock.cc  -fPIC -DPIC -o .libs/rwlock.o
../../../transactional-memory/libitm/config/posix/rwlock.cc: In constructor 'GTM::gtm_rwlock::gtm_rwlock()':
../../../transactional-memory/libitm/config/posix/rwlock.cc:40:17: error: could not convert '{{0, 0, 0, 0, 19800}, {{{0}}}, 0}' to 'pthread_mutex_t'
../../../transactional-memory/libitm/config/posix/rwlock.cc:40:17: error: could not convert '{{{0, 0, 0, 0}, 0, 17238}, 0}' to 'pthread_cond_t'
../../../transactional-memory/libitm/config/posix/rwlock.cc:40:17: error: could not convert '{{{0, 0, 0, 0}, 0, 17238}, 0}' to 'pthread_cond_t'
../../../transactional-memory/libitm/config/posix/rwlock.cc:40:17: error: could not convert '{{{0, 0, 0, 0}, 0, 17238}, 0}' to 'pthread_cond_t'
gmake[4]: *** [rwlock.lo] Error 1
gmake[4]: Leaving directory `/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libitm'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libitm'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/proj/spear1/gcc_stm/build/i386-pc-solaris2.10/libitm'
gmake[1]: *** [all-target-libitm] Error 2
gmake[1]: Leaving directory `/proj/spear1/gcc_stm/build'
gmake: *** [all] Error 2
</output>

Any advice would be great!

Thanks,
Mike Spear
Comment 1 Alexandre Oliva 2010-11-18 12:02:26 UTC
Mine.  Patch that fixes this is at http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01773.html
Comment 2 Aldy Hernandez 2010-11-19 18:06:01 UTC
BTW, a workaround while Alex gets his patch committed is to run make again on the partially built tree.  The second time around, the build will succeed.
Comment 3 Alexandre Oliva 2010-11-26 05:00:30 UTC
Fixed, branch and trunk.
Comment 4 Alexandre Oliva 2010-12-06 13:04:11 UTC
Author: aoliva
Date: Mon Dec  6 13:04:07 2010
New Revision: 167491

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167491
Log:
Check in for PR other/46020 was meant for PR other/46026.

Modified:
    branches/transactional-memory/ChangeLog
Comment 5 Alexandre Oliva 2010-12-06 13:11:55 UTC
Author: aoliva
Date: Mon Dec  6 13:11:51 2010
New Revision: 167493

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167493
Log:
Check in for PR other/46020 was meant for PR other/46026.

Modified:
    trunk/ChangeLog