Skip to content

Failure to build iso_varying_string #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
everythingfunctional opened this issue Dec 1, 2020 · 1 comment · Fixed by #267
Closed

Failure to build iso_varying_string #263

everythingfunctional opened this issue Dec 1, 2020 · 1 comment · Fixed by #267
Assignees
Labels
bug Something isn't working

Comments

@everythingfunctional
Copy link
Member

I wanted to see how well the Fortran version was doing (I haven't really used it at all yet). I tried building my iso_varying_string package and got the following error.

 + gfortran  build/gfortran_debug/test/unit_test_main.f90.o build/gfortran_debug/test/unit_test_adjustl_test.f90.o build/gfortran_debug/test/unit_test_adjustr_test.f90.o build/gfortran_debug/test/unit_test_assignment_test.f90.o build/gfortran_debug/test/unit_test_char_test.f90.o build/gfortran_debug/test/unit_test_concat_test.f90.o build/gfortran_debug/test/unit_test_equal_test.f90.o build/gfortran_debug/test/unit_test_extract_test.f90.o build/gfortran_debug/test/unit_test_greater_than_equal_test.f90.o build/gfortran_debug/test/unit_test_greater_than_test.f90.o build/gfortran_debug/test/unit_test_iachar_test.f90.o build/gfortran_debug/test/unit_test_ichar_test.f90.o build/gfortran_debug/test/unit_test_index_test.f90.o build/gfortran_debug/test/unit_test_insert_test.f90.o build/gfortran_debug/test/unit_test_len_test.f90.o build/gfortran_debug/test/unit_test_len_trim_test.f90.o build/gfortran_debug/test/unit_test_less_than_equal_test.f90.o build/gfortran_debug/test/unit_test_less_than_test.f90.o build/gfortran_debug/test/unit_test_lge_test.f90.o build/gfortran_debug/test/unit_test_lgt_test.f90.o build/gfortran_debug/test/unit_test_lle_test.f90.o build/gfortran_debug/test/unit_test_llt_test.f90.o build/gfortran_debug/test/unit_test_not_equal_test.f90.o build/gfortran_debug/test/unit_test_remove_test.f90.o build/gfortran_debug/test/unit_test_repeat_test.f90.o build/gfortran_debug/test/unit_test_replace_range_test.f90.o build/gfortran_debug/test/unit_test_replace_start_test.f90.o build/gfortran_debug/test/unit_test_replace_target_test.f90.o build/gfortran_debug/test/unit_test_scan_test.f90.o build/gfortran_debug/test/unit_test_split_character_set_test.f90.o build/gfortran_debug/test/unit_test_split_string_set_test.f90.o build/gfortran_debug/test/unit_test_trim_test.f90.o build/gfortran_debug/test/unit_test_var_str_test.f90.o build/gfortran_debug/test/unit_test_verify_test.f90.o -Wall -Wextra -Wimplicit-interface  -fPIC -fmax-errors=1 -g -fbounds-check -fcheck-array-temporaries -fbacktrace -Jbuild/gfortran_debug/iso_varying_string build/gfortran_debug/iso_varying_string/libiso_varying_string.a  -o build/gfortran_debug/test/unit_test
Undefined symbols for architecture x86_64:
  "___custom_generator_MOD___vtab_3126CD9", referenced from:
      ___repeat_test_MOD_test_repeat in unit_test_repeat_test.f90.o
  "___custom_generator_MOD___vtab_custom_generator_Ascii_character_generator_t", referenced from:
      ___iachar_test_MOD_test_iachar in unit_test_iachar_test.f90.o
      ___ichar_test_MOD_test_ichar in unit_test_ichar_test.f90.o
  "___custom_generator_MOD___vtab_custom_generator_Ascii_string_pair_generator_t", referenced from:
      ___concat_test_MOD_test_concat in unit_test_concat_test.f90.o
      ___equal_test_MOD_test_equals in unit_test_equal_test.f90.o
      ___greater_than_equal_test_MOD_test_greater_than_equals in unit_test_greater_than_equal_test.f90.o
      ___greater_than_test_MOD_test_greater_than in unit_test_greater_than_test.f90.o
      ___index_test_MOD_test_index in unit_test_index_test.f90.o
      ___less_than_equal_test_MOD_test_less_than_equals in unit_test_less_than_equal_test.f90.o
      ___less_than_test_MOD_test_less_than in unit_test_less_than_test.f90.o
      ...
  "___custom_generator_MOD___vtab_custom_generator_Character_input_t", referenced from:
      ___iachar_test_MOD_check_iachar in unit_test_iachar_test.f90.o
      ___ichar_test_MOD_check_ichar in unit_test_ichar_test.f90.o
  "___custom_generator_MOD___vtab_custom_generator_String_and_integer_input_t", referenced from:
      ___repeat_test_MOD_check_repeat in unit_test_repeat_test.f90.o
  "___custom_generator_MOD___vtab_custom_generator_String_pair_input_t", referenced from:
      ___concat_test_MOD_check_concat_character_and_string in unit_test_concat_test.f90.o
      ___concat_test_MOD_check_concat_string_and_character in unit_test_concat_test.f90.o
      ___concat_test_MOD_check_concat_strings in unit_test_concat_test.f90.o
      ___equal_test_MOD_check_string_equal_character in unit_test_equal_test.f90.o
      ___equal_test_MOD_check_character_equal_string in unit_test_equal_test.f90.o
      ___equal_test_MOD_check_string_equal_string in unit_test_equal_test.f90.o
      ___greater_than_equal_test_MOD_check_string_greater_than_equal_character in unit_test_greater_than_equal_test.f90.o
      ...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
 Command failed
ERROR STOP 

Error termination. Backtrace:
#0  0x106e70ebd
#1  0x106e71b75
#2  0x106e72f03
#3  0x106dbb9f8
#4  0x106da8810
#5  0x106da90b2
#6  0x106da7a0f
#7  0x106e3d894

This error is from MacOS, but a similar one is emitted on Linux. I suspect an issue with ordering of things in the link command, but I'm not sure.

@everythingfunctional everythingfunctional added bug Something isn't working fpm-fortran labels Dec 1, 2020
@LKedward
Copy link
Member

LKedward commented Dec 1, 2020

Thanks for trying it out @everythingfunctional and reporting these. It appears there's a bug where tests and executables are only linked to non-library modules that they use directly. Non-library modules that are used via other modules are not added to the link list. Since this relates to the refactoring in #248, I will prepare a fix and tests for after that is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants