[Libosinfo] Can't build due to ld option --no-undefined

Programmingkid programmingkidx at gmail.com
Thu May 12 00:34:24 UTC 2016


On May 11, 2016, at 7:00 PM, Fabiano Fidêncio wrote:

> On Thu, May 12, 2016 at 12:41 AM, Programmingkid
> <programmingkidx at gmail.com> wrote:
>> 
>> On May 11, 2016, at 6:35 PM, Fabiano Fidêncio wrote:
>> 
>>> [trimmed]
>>> 
>>>> 
>>>> I went to this page: https://gitlab.com/libosinfo/libosinfo/, then clicked the Download ZIP link. I can see that it has changed since I last downloaded it.
>>>> 
>>>> After trying libosinfo-master-489fe46356d4a8056043af89c635a84aa4bade16, I saw the --no-undefined error again.
>>>> 
>>>> /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h:36: warning: 'g_list_store_get_type' is deprecated (declared at /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h:36) [-Wdeprecated-declarations]
>>>> CCLD     libosinfo-1.0.la
>>>> ld: unknown option: --no-undefined
>>>> collect2: ld returned 1 exit status
>>>> make[3]: *** [libosinfo-1.0.la] Error 1
>>>> make[2]: *** [all] Error 2
>>>> make[1]: *** [all-recursive] Error 1
>>>> make: *** [all] Error 2
>>>> 
>>>> Maybe the link I was given is not the one with the patches applied.
>>> 
>>> Are you used to git? If yes, please, simply do:
>>> git clone https://gitlab.com/libosinfo/libosinfo.git
>>> 
>>> If you're not used to git, then try downloading this file:
>>> https://gitlab.com/libosinfo/libosinfo/repository/archive.zip?ref=master
>>> 
>>> And then:
>>> cd libosinfo
>>> ./autogen.sh && make
>>> 
>>> Let me know if it solves your issue (that just seems to be an
>>> environment without the needed patches)
>>> 
>>> Best Regards,
>>> --
>>> Fabiano Fidêncio
>> 
>> Thank you very much for the directions. They were easy to follow.
>> 
>> Sorry but a depreciation error took place:
>> 
>> /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/glistmodel.h:36: warning: 'g_list_model_get_type' is deprecated (declared at /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/glistmodel.h:36) [-Wdeprecated-declarations]
>> In file included from /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gio.h:165,
>>                 from ../osinfo/osinfo_device_driver.h:25,
>>                 from ../osinfo/osinfo.h:37,
>>                 from osinfo_avatar_format.c:28:
>> /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h: In function 'G_LIST_STORE':
>> /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h:36: warning: 'g_list_store_get_type' is deprecated (declared at /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h:36) [-Wdeprecated-declarations]
>> /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h: In function 'G_IS_LIST_STORE':
>> /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h:36: warning: 'g_list_store_get_type' is deprecated (declared at /usr/local/Cellar/glib/2.46.2/include/glib-2.0/gio/gliststore.h:36) [-Wdeprecated-declarations]
>> make[3]: *** [libosinfo_1_0_la-osinfo_avatar_format.lo] Error 1
>> make[2]: *** [all] Error 2
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>> 
> 
> Please, I have to ask you again, use pastebin and paste the full log
> 
> The deprecations are generating warnings, not errors. Try to not
> use/disable -Werror, it should solve your issue

That did fix things. I would make a patch that removes -Werror, but I don't know which file to target. Removing it from config.status does appear to make things better. Can't make a patch for that file because it is dynamically generated. Thank you for all your help.




More information about the Libosinfo mailing list