Skip to content

Conversation

@mo-vic
Copy link

@mo-vic mo-vic commented Oct 6, 2024

Build Environment

OS:
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble

GCC Version:
Default gcc-10 (i.e., gcc version 10.5.0 (Ubuntu 10.5.0-4ubuntu2))

Error Message

Mismatch of function pointer cause compile error:

/home/movic/iEDA/src/utility/log/Log.cc: In static member function ‘static void ieda::Log::init(char**, std::string)’:
/home/movic/iEDA/src/utility/log/Log.cc:79:32: error: invalid conversion from ‘void (*)(const char*, int)’ to ‘void (*)(const char*, size_t)’ {aka ‘void (*)(const char*, long unsigned int)’} [-fpermissive]
   79 |   google::InstallFailureWriter(&SignalHandle);
      |                                ^~~~~~~~~~~~~
      |                                |
      |                                void (*)(const char*, int)
In file included from /home/movic/iEDA/src/utility/log/Log.hh:27,
                 from /home/movic/iEDA/src/utility/log/Log.cc:25:
/usr/include/glog/logging.h:1992:12: note:   initializing argument 1 of ‘void google::InstallFailureWriter(void (*)(const char*, size_t))’
 1992 |     void (*writer)(const char* data, size_t size));
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Solution

Fixed by replace int with size_t.

@0xharry
Copy link
Contributor

0xharry commented Oct 22, 2024

Thank you for your contribution!

Our team primarily uses Ubuntu 20.04 LTS for development. We need to conduct further testing with this environment to ensure compatibility. Once the tests are successful, we will proceed with merging your pull request.

Thank you for your understanding and patience.

@Emin017
Copy link
Contributor

Emin017 commented Mar 16, 2025

This will cause build failures for iEDA on Ubuntu 22.04 or older versions, as the glog version on these Ubuntu releases is 0.4.0 (or 0.5.0), which requires the size type to be declared as int.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants