This repository has been archived by the owner. It is now read-only.

cross-compiling IOR #4

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

Comments

Projects
None yet
2 participants
@roblatham00

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

This comment has been minimized.

Show comment Hide comment
@morrone

morrone Sep 4, 2012

Member

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.

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.

@morrone morrone closed this in 8426465 Sep 12, 2012

stakizawa added a commit to stakizawa/kmrnext that referenced this issue Jan 4, 2016

Remove AC_FUNC_MALLOC from configure.ac
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

Fix rpl_malloc not found when cross-compiling
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

@sdt sdt referenced this issue in axel-download-accelerator/axel Jun 20, 2016

Merged

Fix rpl_malloc not found when cross-compiling #26

@guillerodriguez guillerodriguez referenced this issue in pagekite/libpagekite Feb 22, 2017

Closed

Make configure.ac cross-compiler friendly #30

BenWiederhake added a commit to majn/tgl that referenced this issue Jun 17, 2017

Fix "rpl_malloc not found" when cross-compiling, re-run autoreconf
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

Fix "rpl_malloc not found" when cross-compiling, re-run autoreconf
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

@rdp rdp referenced this issue in rdp/ffmpeg-windows-build-helpers Oct 20, 2017

Closed

FFMpeg build failing for 16.04 libbs2b #270

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.