<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Cross compiling Mesa 9.1 and wrong ar and ranlib for libglslcore and libglcpp</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hello,<BR>
<BR>
I am trying to cross compile Mesa 9.1.0 (because I saw that patches for<BR>
cross compiling were added in this release) on a x86_64-box (Gentoo<BR>
Linux) for ARM and configured it with:<BR>
<BR>
autoreconf --install --force #otherwise it complains on my system<BR>
./configure --host=armv6j-hardfloat-linux-gnueabi --prefix=/home/shared/vendor/install-gcc-arm-debug --with-gallium-drivers=swrast --with-dri-drivers= --with-expat=/home/shared/vendor/install-gcc-arm-debug<BR>
<BR>
Then I run make with:<BR>
<BR>
make LIBTOOLFLAGS=-v<BR>
<BR>
and receive the following output:<BR>
...<BR>
libtool: compile: gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.1.0\" "-DPACKAGE_STRING=\"Mesa 9.1.0\"" "-DPACKAGE_BUGREPORT=\"<A HREF="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\">https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\</A>"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I. -I ../../../include -I ../../../src/mapi -I ../../../src/mesa -I ../../../src/glsl -I ../../../src/glsl/glcpp -I ../../../src/glsl -D_GNU_SOURCE -g -O2 -Wall -std=c99 -fno-strict-aliasing -fno-builtin-memcmp -MT strtod.lo -MD -MP -MF .deps/strtod.Tpo -c ../../../src/glsl/strtod.c -fPIC -DPIC -o .libs/strtod.o<BR>
CXXLD libglslcore.la<BR>
libtool: link: armv6j-hardfloat-linux-gnueabi-ar cru .libs/libglslcore.a .libs/glsl_lexer.o .libs/glsl_parser.o .libs/ast_expr.o .libs/ast_function.o .libs/ast_to_hir.o .libs/ast_type.o .libs/builtin_variables.o .libs/glsl_parser_extras.o .libs/glsl_types.o .libs/glsl_symbol_table.o .libs/hir_field_selection.o .libs/ir_basic_block.o .libs/ir_builder.o .libs/ir_clone.o .libs/ir_constant_expression.o .libs/ir.o .libs/ir_expression_flattening.o .libs/ir_function_can_inline.o .libs/ir_function_detect_recursion.o .libs/ir_function.o .libs/ir_hierarchical_visitor.o .libs/ir_hv_accept.o .libs/ir_import_prototypes.o .libs/ir_print_visitor.o .libs/ir_reader.o .libs/ir_rvalue_visitor.o .libs/ir_set_program_inouts.o .libs/ir_validate.o .libs/ir_variable_refcount.o .libs/linker.o .libs/link_functions.o .libs/link_uniforms.o .libs/link_uniform_initializers.o .libs/link_uniform_block_active_visitor.o .libs/link_uniform_blocks.o .libs/link_varyings.o .libs/loop_analysis.o .libs/loop_controls.o .libs/loop_unroll.o .libs/lower_clip_distance.o .libs/lower_discard.o .libs/lower_discard_flow.o .libs/lower_if_to_cond_assign.o .libs/lower_instructions.o .libs/lower_jumps.o .libs/lower_mat_op_to_vec.o .libs/lower_noise.o .libs/lower_packed_varyings.o .libs/lower_packing_builtins.o .libs/lower_texture_projection.o .libs/lower_variable_index_to_cond_assign.o .libs/lower_vec_index_to_cond_assign.o .libs/lower_vec_index_to_swizzle.o .libs/lower_vector.o .libs/lower_output_reads.o .libs/lower_ubo_reference.o .libs/opt_algebraic.o .libs/opt_array_splitting.o .libs/opt_constant_folding.o .libs/opt_constant_propagation.o .libs/opt_constant_variable.o .libs/opt_copy_propagation.o .libs/opt_copy_propagation_elements.o .libs/opt_dead_code.o .libs/opt_dead_code_local.o .libs/opt_dead_functions.o .libs/opt_function_inlining.o .libs/opt_if_simplification.o .libs/opt_noop_swizzle.o .libs/opt_redundant_jumps.o .libs/opt_structure_splitting.o .libs/opt_swizzle_swizzle.o .libs/opt_tree_grafting.o .libs/s_expression.o .libs/strtod.o<BR>
libtool: link: armv6j-hardfloat-linux-gnueabi-ranlib .libs/libglslcore.a<BR>
libtool: link: creating libglslcore.la<BR>
...<BR>
libtool: compile: gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.1.0\" "-DPACKAGE_STRING=\"Mesa 9.1.0\"" "-DPACKAGE_BUGREPORT=\"<A HREF="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\">https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\</A>"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I. -I ../../../include -I ../../../src/mapi -I ../../../src/mesa -I ../../../src/glsl -I ../../../src/glsl/glcpp -I ../../../src/glsl -D_GNU_SOURCE -g -O2 -Wall -std=c99 -fno-strict-aliasing -fno-builtin-memcmp -MT pp.lo -MD -MP -MF .deps/pp.Tpo -c ../../../src/glsl/glcpp/pp.c -fPIC -DPIC -o .libs/pp.o<BR>
CCLD libglcpp.la<BR>
libtool: link: armv6j-hardfloat-linux-gnueabi-ar cru .libs/libglcpp.a .libs/glcpp-lex.o .libs/glcpp-parse.o .libs/ralloc.o .libs/pp.o<BR>
libtool: link: armv6j-hardfloat-linux-gnueabi-ranlib .libs/libglcpp.a<BR>
libtool: link: creating libglcpp.la<BR>
...<BR>
CXX main.o<BR>
CXXLD builtin_compiler<BR>
libtool: link: g++ -I ../../../include -I ../../../src/mapi -I ../../../src/mesa -I ../../../src/glsl -I ../../../src/glsl/glcpp -I ../../../src/glsl -D_GNU_SOURCE -g -O2 -Wall -fno-strict-aliasing -fno-builtin-memcmp -o builtin_compiler hash_table.o imports.o prog_hash_table.o symbol_table.o builtin_stubs.o standalone_scaffolding.o main.o ./.libs/libglslcore.a /usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.6.3/libstdc++.so -lm ./.libs/libglcpp.a -Wl,-rpath -Wl,/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.6.3 -Wl,-rpath -Wl,/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.6.3<BR>
./.libs/libglslcore.a: could not read symbols: Archive has no index; run ranlib to add one<BR>
collect2: ld returned 1 exit status<BR>
<BR>
It compiles the object files correctly with my system's compiler, but<BR>
for linking the libraries, libtool uses ar and ranlib of the cross<BR>
toolchain.<BR>
<BR>
I am not really an autotools expert and I can find no way to tell<BR>
libtool to use the correct tools. Maybe I have just overlooked something<BR>
trivial.<BR>
<BR>
Thank you for your help,<BR>
<BR>
Martin<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>