Skip to content

Linking errors after switched to new emsdk... #15958

Closed

Description

@Honya2000

Hello,
I recently switched to new emsdk and now cannot link my projects with this errors:

error: undefined symbol: _get_daylight (referenced by tzset_impl__deps: ['_get_daylight','_get_timezone','_get_tzname'], referenced by tzset__deps: ['tzset_impl'], referenced by localtime_r__deps: ['tzset'], referenced by __localtime_r__deps: ['localtime_r'], referenced by top-level compiled C/C++ code)
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __get_daylight may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _get_timezone (referenced by tzset_impl__deps: ['_get_daylight','_get_timezone','_get_tzname'], referenced by tzset__deps: ['tzset_impl'], referenced by localtime_r__deps: ['tzset'], referenced by __localtime_r__deps: ['localtime_r'], referenced by top-level compiled C/C++ code)
warning: __get_timezone may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _get_tzname (referenced by tzset_impl__deps: ['_get_daylight','_get_timezone','_get_tzname'], referenced by tzset__deps: ['tzset_impl'], referenced by localtime_r__deps: ['tzset'], referenced by __localtime_r__deps: ['localtime_r'], referenced by top-level compiled C/C++ code)
warning: __get_tzname may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
em++: error: 'D:/Projects/emsdk/node/14.15.5_64bit/bin/node.exe D:\Projects\emsdk\upstream\emscripten\src\compiler.js C:\Users\Andrey\AppData\Local\Temp\tmphplnjtvj.txt' failed (returned 1)
ninja: build stopped: subcommand failed.

What can be the issue?

Activity

  1. Honya2000 commented on Jan 11, 2022

    @Honya2000
    Author

    Weird thing is that i'm seems like do not use those functions at all.
    Not sure why linker complains...

  2. kripken commented on Jan 11, 2022

    @kripken
    Member

    Perhaps try ./emcc --clear-cache just to make sure. And rebuild all your project's libraries from scratch (maybe this is caused by old object files in the previous sdk being linked with the new).

  3. pieper commented on Jan 22, 2022

    @pieper

    I ran into the same link errors that @Honya2000 reported when I tried to build Little-CMS. 3.1.2 and 3.0.1 both failed, but 2.0.6 worked. This was on a fresh ubuntu 20.04 on a cloud VM so no old cache files.

  4. kripken commented on Jan 25, 2022

    @kripken
    Member

    Ok, this sounds like a regression then. If one of you can bisect it, that should be the fastest way to find what caused the issue,

    https://emscripten.org/docs/contributing/developers_guide.html#bisecting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions