Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

cross-compiling IOR #4

Closed
roblatham00 opened this issue Sep 4, 2012 · 1 comment
Closed

cross-compiling IOR #4

roblatham00 opened this issue Sep 4, 2012 · 1 comment

Comments

@roblatham00
Copy link

Issue: undefined references to 'rpl_malloc' when cross compiling

Cause: AC_FUNC_MALLOC is based on a run-time test

When cross-compiling, the run-time test cannot run, so autoconf assumes non-gnu-libc behavior

(I found this link helpful: http://wiki.buici.com/xwiki/bin/view/Programing+C+and+C%2B%2B/Autoconf+and+RPL_MALLOC )

Platform: Blue Gene /P (but probably /L and maybe /Q?)

mpicc  -g -O2   -o ior ior.o utilities.o parse_options.o aiori-POSIX.o aiori-MPIIO.o     -lm
ior.o: In function `HumanReadable':
../../src/ior.c:917: undefined reference to `rpl_malloc'
ior.o: In function `CreateTest':
../../src/ior.c:583: undefined reference to `rpl_malloc'
ior.o: In function `AllocResults':
../../src/ior.c:532: undefined reference to `rpl_malloc'
../../src/ior.c:536: undefined reference to `rpl_malloc'
../../src/ior.c:541: undefined reference to `rpl_malloc'

I can work around this with an environment variable but if you could toss a 'rpl_malloc' in IOR to keep cross compilers happy, that would be great.

@morrone
Copy link
Member

morrone commented Sep 4, 2012

It looks like removing AC_FUNC_MALLOC from configure.in would work as well. I don't think that I made a conscious decision to include AC_FUNC_MALLOC; it probably just was part of what autoscan produced when I started the configure.in file.

So I think I'll likely just back out that line as the quick solution. IOR should work as well as it always has without it.

You could try it out by removing that line, and then running "bootstrap" to regenerate the configure script.

FYI, I did not see this on BG/Q. Likely because the architectures are more similar on the compilation and compute nodes with Q.

stakizawa added a commit to stakizawa/kmrnext that referenced this issue Jan 4, 2016
I removed AC_FUNC_MALLOC from configure.ac, to allow compilation on K Computer.
For detail, see the following link.

LLNL/ior#4
sdt added a commit to axel-download-accelerator/axel that referenced this issue Jun 20, 2016
AC_FUNC_MALLOC & AC_FUNC_REALLOC cause link errors when cross-compiling.

It seems the preferred solution is to just remove them, and optionally adding
them to the AC_CHECK_FUNCS section.

eg.
    LLNL/ior#4
    http://rickfoosusa.blogspot.com.au/2011/11/howto-fix-undefined-reference-to.html
BenWiederhake added a commit to majn/tgl that referenced this issue Jun 17, 2017
AC_FUNC_MALLOC & AC_FUNC_REALLOC cause link errors when cross-compiling.

It seems the preferred solution is to just remove them, and optionally adding
them to the AC_CHECK_FUNCS section.

Examples:
- LLNL/ior#4
- stakizawa/kmrnext@4733172
- axel-download-accelerator/axel@6667e4c
  (used as template for this commit message; thanks!)
- https://rickfoosusa.blogspot.de/2011/11/howto-fix-undefined-reference-to.html
BenWiederhake added a commit to BenWiederhake/telegram-purple that referenced this issue Jun 17, 2017
AC_FUNC_MALLOC & AC_FUNC_REALLOC cause link errors when cross-compiling.

It seems the preferred solution is to just remove them, and optionally adding
them to the AC_CHECK_FUNCS section.

Examples:
- LLNL/ior#4
- stakizawa/kmrnext@4733172
- axel-download-accelerator/axel@6667e4c
  (used as template for this commit message; thanks!)
- https://rickfoosusa.blogspot.de/2011/11/howto-fix-undefined-reference-to.html
- majn/tgl@c58d62b
osteffen pushed a commit to ThinkParQ/ior-1 that referenced this issue Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants