public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Help with using multilib for Cilk Library
@ 2013-07-19 18:22 Iyer, Balaji V
  2013-07-19 22:26 ` Ian Lance Taylor
  0 siblings, 1 reply; 10+ messages in thread
From: Iyer, Balaji V @ 2013-07-19 18:22 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org', 'Ian Lance Taylor (iant@google.com)'

[-- Attachment #1: Type: text/plain, Size: 3686 bytes --]

Hello Everyone,
	I am trying to use Multilib on Cilk Library. I looked at this website (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and libgo as samples to model after. It is currently failing with the following error message:

libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-gcc-multilib/./gcc/32/crtbeginS.o  .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64 -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o .libs/libcilkrts.so.5.0.3511
/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[4]: *** [libcilkrts.la] Error 1
make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libcilkrts'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/export/users/my-files/b-gcc


From what it looks like, it is reading the 64 bit library for the 32 bit mode (or vice-versa). How do I fix this? I am also attaching my configure.ac and Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff commented out etc). Can someone please tell me what I am doing wrong?

Any help is greatly appreciated!

Thanks,

Balaji V. Iyer.


[-- Attachment #2: configure.ac --]
[-- Type: application/octet-stream, Size: 3232 bytes --]

#  @copyright
#  Copyright (C) 2011
#  Intel Corporation
#  
#  @copyright
#  This file is part of the Intel Cilk Plus Library.  This library is free
#  software; you can redistribute it and/or modify it under the
#  terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 3, or (at your option)
#  any later version.
#  
#  @copyright
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  @copyright
#  Under Section 7 of GPL version 3, you are granted additional
#  permissions described in the GCC Runtime Library Exception, version
#  3.1, as published by the Free Software Foundation.
#  
#  @copyright
#  You should have received a copy of the GNU General Public License and
#  a copy of the GCC Runtime Library Exception along with this program;
#  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
#  <http://www.gnu.org/licenses/>.

AC_INIT([Cilk Runtime Library], [2.0], [cilk@intel.com])
AC_PREREQ([2.64])
# AM_INIT_AUTOMAKE([1.11 no-define])
AM_INIT_AUTOMAKE(foreign no-dist)

# Build a DLL on Windows
# AC_LIBTOOL_WIN32_DLL
AC_PROG_CXX
AC_PROG_CC
# AC_PROG_LIBTOOL
# AC_CONFIG_MACRO_DIR([..])
AC_CONFIG_FILES([Makefile])
AM_ENABLE_MULTILIB(, ..)

if test "${multilib}" = "yes"; then
  multilib_arg="--enable-multilib"
else
  multilib_arg=
fi

AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
AC_ARG_ENABLE([version-specific-runtime-libs],
  AC_HELP_STRING([--enable-version-specific-runtime-libs],
                 [Specify that runtime libraries should be installed in a compiler-specific directory]),
  [case "$enableval" in
    yes) enable_version_specific_runtime_libs=yes ;;
    no)  enable_version_specific_runtime_libs=no ;;
    *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
   esac],
  [enable_version_specific_runtime_libs=no])
AC_MSG_RESULT($enable_version_specific_runtime_libs)


# Calculate toolexeclibdir
# Also toolexecdir, though it's only used in toolexeclibdir
case ${enable_version_specific_runtime_libs} in
  yes)
    # Need the gcc compiler version to know where to install libraries
    # and header files if --enable-version-specific-runtime-libs option
    # is selected.
    toolexecdir='$(libdir)/gcc/$(target_alias)'
    toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
    ;;
  no)
    if test -n "$with_cross_host" &&
       test x"$with_cross_host" != x"no"; then
      # Install a library built with a cross compiler in tooldir, not libdir.
      toolexecdir='$(exec_prefix)/$(target_alias)'
      toolexeclibdir='$(toolexecdir)/lib'
    else
      toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
      toolexeclibdir='$(libdir)'
    fi
    multi_os_directory=`$CC -print-multi-os-directory`
    case $multi_os_directory in
      .) ;; # Avoid trailing /.
      *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
    esac
    ;;
esac
AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)

AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
AC_OUTPUT

[-- Attachment #3: Makefile.am --]
[-- Type: application/octet-stream, Size: 3970 bytes --]

#  @copyright
#  Copyright (C) 2011
#  Intel Corporation
#  
#  @copyright
#  This file is part of the Intel Cilk Plus Library.  This library is free
#  software; you can redistribute it and/or modify it under the
#  terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 3, or (at your option)
#  any later version.
#  
#  @copyright
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  @copyright
#  Under Section 7 of GPL version 3, you are granted additional
#  permissions described in the GCC Runtime Library Exception, version
#  3.1, as published by the Free Software Foundation.
#  
#  @copyright
#  You should have received a copy of the GNU General Public License and
#  a copy of the GCC Runtime Library Exception along with this program;
#  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
#  <http://www.gnu.org/licenses/>.

AUTOMAKE_OPTIONS = foreign

# Use when building GCC
ACLOCAL_AMFLAGS = -I .. -I ../config

# Use when just building the Intel Cilk Plus runtime
#ACLOCAL_AMFLAGS = -I m4

# Compiler and linker flags.
GENERAL_FLAGS = -I$(top_srcdir)/include -DIN_CILK_RUNTIME=1
GENERAL_FLAGS += -fpic -O3
GENERAL_FLAGS += -DBUILD_USER=\"$(USER)\"
GENERAL_FLAGS += -DBUILD_HOST=\"`hostname`\"

# Enable Intel Cilk Plus extension
GENERAL_FLAGS += -fcilkplus

AM_CFLAGS = $(GENERAL_FLAGS) -std=c99
AM_CPPFLAGS = $(GENERAL_FLAGS)
AM_LDFLAGS = -lpthread -ldl

# Target list.
lib_LTLIBRARIES = libcilkrts.la

libcilkrts_la_SOURCES =            \
  runtime/bug.cpp                  \
  runtime/cilk-abi.c               \
  runtime/cilk-abi-cilk-for.cpp    \
  runtime/cilk-abi-vla.c           \
  runtime/cilk-abi-vla-internal.c  \
  runtime/cilk_api.c               \
  runtime/cilk_fiber.cpp           \
  runtime/cilk_fiber-unix.cpp      \
  runtime/cilk_malloc.c            \
  runtime/c_reducers.c             \
  runtime/except-gcc.cpp           \
  runtime/frame_malloc.c           \
  runtime/full_frame.c             \
  runtime/global_state.cpp         \
  runtime/jmpbuf.c                 \
  runtime/local_state.c            \
  runtime/metacall_impl.c          \
  runtime/os_mutex-unix.c          \
  runtime/os-unix.c                \
  runtime/pedigrees.c              \
  runtime/record-replay.cpp        \
  runtime/reducer_impl.cpp         \
  runtime/scheduler.c              \
  runtime/signal_node.c            \
  runtime/spin_mutex.c             \
  runtime/stats.c                  \
  runtime/symbol_test.c            \
  runtime/sysdep-unix.c            \
  runtime/worker_mutex.c

# Load the $(REVISION) value.
include include/internal/rev.mk

libcilkrts_la_LDFLAGS  = -rpath '$(libdir)'
libcilkrts_la_LDFLAGS += -version-info 5:$(CILK_REVISION):0
libcilkrts_la_LDFLAGS += -lpthread -ldl

# Hack for Cygwin
libcilkrts_la_LDFLAGS += -no-undefined

# C/C++ header files for Cilk.
cilkincludedir = $(includedir)/cilk
cilkinclude_HEADERS =              \
  include/cilk/cilk_api.h          \
  include/cilk/cilk_api_linux.h    \
  include/cilk/cilk.h              \
  include/cilk/cilk_stub.h         \
  include/cilk/cilk_undocumented.h \
  include/cilk/common.h            \
  include/cilk/holder.h            \
  include/cilk/hyperobject_base.h  \
  include/cilk/metaprogramming.h   \
  include/cilk/reducer_file.h      \
  include/cilk/reducer.h           \
  include/cilk/reducer_list.h      \
  include/cilk/reducer_max.h       \
  include/cilk/reducer_min.h       \
  include/cilk/reducer_min_max.h   \
  include/cilk/reducer_opadd.h     \
  include/cilk/reducer_opand.h     \
  include/cilk/reducer_opmul.h     \
  include/cilk/reducer_opor.h      \
  include/cilk/reducer_opxor.h     \
  include/cilk/reducer_ostream.h   \
  include/cilk/reducer_string.h

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-23 21:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19 18:22 Help with using multilib for Cilk Library Iyer, Balaji V
2013-07-19 22:26 ` Ian Lance Taylor
2013-07-19 22:53   ` Iyer, Balaji V
2013-07-19 22:56     ` H.J. Lu
2013-07-22 16:28       ` Iyer, Balaji V
2013-07-22 21:07         ` H.J. Lu
2013-07-23 16:33           ` Iyer, Balaji V
2013-07-23 17:03             ` H.J. Lu
2013-07-23 21:24               ` Iyer, Balaji V
2013-07-19 23:06     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).