http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54884



--- Comment #7 from Andrew Benson <abensonca at gmail dot com> 2012-12-19 
17:31:47 UTC ---

The fix for this bug has been working for me, but I'm getting reports from

several colleagues (who are trying to install the FoX library so that they can

install my software) that compiling the FoX library fails with what seems to be

the same problem as reported here:



gfortran -g -O2   -o  wxml_example wxml_example.o $(../FoX-config --libs

--wxml)

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_core.o): In

function `__m_wxml_core_MOD_write_attributes':

m_wxml_core.F90:(.text+0x1a1): undefined reference to

`__m_common_attrs_MOD_get_value_by_index_len'

m_wxml_core.F90:(.text+0x232): undefined reference to

`__m_common_attrs_MOD_get_key_len'

m_wxml_core.F90:(.text+0x27d): undefined reference to

`__m_common_attrs_MOD_get_value_by_index_len'

m_wxml_core.F90:(.text+0x321): undefined reference to

`__m_common_attrs_MOD_get_key_len'

m_wxml_core.F90:(.text+0x3cc): undefined reference to

`__m_common_attrs_MOD_get_value_by_index_len'

m_wxml_core.F90:(.text+0x431): undefined reference to

`__m_common_attrs_MOD_get_value_by_index_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_core.o): In

function `__m_wxml_core_MOD_xml_addattribute_ch':

m_wxml_core.F90:(.text+0x2818): undefined reference to

`__m_common_namespaces_MOD_getprefixindex'

m_wxml_core.F90:(.text+0x2d26): undefined reference to

`__m_common_namespaces_MOD_getprefixindex'

m_wxml_core.F90:(.text+0x3298): undefined reference to

`__m_common_namespaces_MOD_getprefixindex'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_overloads.o):

In function `__m_wxml_overloads_MOD_pseudoattributematrixch':

m_wxml_overloads.F90:(.text+0xc2): undefined reference to

`__fox_m_fsys_format_MOD_str_string_matrix_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_overloads.o):

In function `__m_wxml_overloads_MOD_pseudoattributearraych':

m_wxml_overloads.F90:(.text+0xea8): undefined reference to

`__fox_m_fsys_format_MOD_str_string_array_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_overloads.o):

In function `__m_wxml_overloads_MOD_attributematrixch':

m_wxml_overloads.F90:(.text+0x2182): undefined reference to

`__fox_m_fsys_format_MOD_str_string_matrix_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_overloads.o):

In function `__m_wxml_overloads_MOD_attributearraych':

m_wxml_overloads.F90:(.text+0x2feb): undefined reference to

`__fox_m_fsys_format_MOD_str_string_array_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_overloads.o):

In function `__m_wxml_overloads_MOD_charactersmatrixch':

m_wxml_overloads.F90:(.text+0x438e): undefined reference to

`__fox_m_fsys_format_MOD_str_string_matrix_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_wxml.a(m_wxml_overloads.o):

In function `__m_wxml_overloads_MOD_charactersarraych':

m_wxml_overloads.F90:(.text+0x4f78): undefined reference to

`__fox_m_fsys_format_MOD_str_string_array_len'

/home/jlgan/galacticus/soft/FoX-4.1.0/objs/lib/libFoX_common.a(m_common_namespaces.o):

In function `__m_common_namespaces_MOD_checknamespaces':

m_common_namespaces.F90:(.text+0x3928): undefined reference to

`__m_common_attrs_MOD_get_key_len'

m_common_namespaces.F90:(.text+0x39b9): undefined reference to

`__m_common_attrs_MOD_get_value_by_index_len'

m_common_namespaces.F90:(.text+0x3f7b): undefined reference to

`__m_common_attrs_MOD_get_key_len'

m_common_namespaces.F90:(.text+0x41a9): undefined reference to

`__m_common_attrs_MOD_get_key_len'

m_common_namespaces.F90:(.text+0x426f): undefined reference to

`__m_common_attrs_MOD_get_value_by_index_len'

collect2: error: ld returned 1 exit status

make[1]: *** [wxml_example] Error 1

make[1]: Leaving directory `/home/jlgan/galacticus/soft/FoX-4.1.0/examples'

make: *** [examples_build] Error 2





These problems have occurred when using the most recent checkout of gcc 4.8.0

(the last case I saw of this happening was yesterday). I've been unable to

reproduce the problem myself, even when using the same revision. 



Manually marking all of the functions that are listed as "undefined reference"

as PUBLIC solves the issue.



In any case, if anyone else is able to reproduce the problem I'd be very

interested to hear!

Reply via email to