Cross compiling Mesa 9.1 and wrong ar and ranlib for libglslcore and libglcpp

"Lederhilger Martin" <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Organization DS-Automotion
Message-ID <[email protected]>
Hello,

 I am trying to cross compile Mesa 9.1.0 (because I saw that patches for
cross compiling were added in this release) on a x86_64-box (Gentoo
Linux) for ARM and configured it with:

autoreconf --install --force    #otherwise it complains on my system
./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

Then I run make with:

make LIBTOOLFLAGS=-v

and receive the following output:
...
libtool: compile:  gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.1.0\" "-DPACKAGE_STRING=\"Mesa 9.1.0\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -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
  CXXLD  libglslcore.la
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 
libtool: link: armv6j-hardfloat-linux-gnueabi-ranlib .libs/libglslcore.a
libtool: link: creating libglslcore.la
...
libtool: compile:  gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.1.0\" "-DPACKAGE_STRING=\"Mesa 9.1.0\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -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
  CCLD   libglcpp.la
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 
libtool: link: armv6j-hardfloat-linux-gnueabi-ranlib .libs/libglcpp.a
libtool: link: creating libglcpp.la
...
CXX    main.o
  CXXLD  builtin_compiler
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
./.libs/libglslcore.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status

It compiles the object files correctly with my system's compiler, but
for linking the libraries, libtool uses ar and ranlib of the cross
toolchain.

I am not really an autotools expert and I can find no way to tell
libtool to use the correct tools. Maybe I have just overlooked something
trivial.

Thank you for your help,

Martin

_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.