Skip to content
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

fwctrl, dev_mgmt: fix build errors #1131

Merged
merged 3 commits into from
Feb 11, 2025
Merged

Conversation

tk154
Copy link

@tk154 tk154 commented Feb 7, 2025

This PR fixes various errors that occurred for me while trying to build the mstflint tools on the master_devel branch.
I used the following configure arguments: --enable-fw-mgr --disable-inband --enable-adb-generic-tools.

tk154 added 3 commits February 7, 2025 14:40
The fwctrl fails to build with the following error:

fwctrl.c: In function 'fwctl_control_access_register':
fwctrl.c:190:27: error: implicit declaration of function 'return_by_reg_status' [-Wimplicit-function-declaration]
  190 |             *reg_status = return_by_reg_status(cmd_status);
      |                           ^~~~~~~~~~~~~~~~~~~~
In file included from fwctrl.c:45:
fwctrl.c:195:56: error: implicit declaration of function 'm_err2str' [-Wimplicit-function-declaration]
  195 |                       reg_id, cmd_status, *reg_status, m_err2str(status));
      |

This commit adds the return_by_reg_status prototype to the
mtcr_ul_com.h file and includes mtcr_ul_com.h and mtcr.h
(where the m_err2str prototype is defined) inside fwctrl.c.

Signed-off-by: Til Kaiser <[email protected]>
There is the following build error:

fwctrl.c: In function 'fwctl_control_access_register':
fwctrl.c:197:66: error: incompatible type for argument 1 of 'm_err2str'
  197 |                       reg_id, cmd_status, *reg_status, m_err2str(status));
      |                                                                  ^~~~~~
      |                                                                  |
      |                                                                  void *
../include/mtcr_ul/fwctrl_ioctl.h:47:81: note: in definition of macro 'FWCTL_DEBUG_PRINT'
   47 |         printf("%s: %s %d: " format, FWCTL_ENV_VAR_DEBUG, __func__, __LINE__, ##arg); \
      |                                                                                 ^~~
In file included from fwctrl.c:43:
../include/mtcr_ul/mtcr.h:173:30: note: expected 'MError' but argument is of type 'void *'
  173 | const char* m_err2str(MError status);
      |                       ~~~~~~~^~~~~~

Looking at the format string, this seems to be just a typo,
so fix that to the correct variable name.

Signed-off-by: Til Kaiser <[email protected]>
The dev_mgt fails to build with the following error:

tools_dev_types.c: In function 'dm_get_device_id_inner':
tools_dev_types.c:695:13: error: implicit declaration of function 'read_device_id'; did you mean 'dm_get_device_id'? [-Wimplicit-function-declaration]
  695 |         if (read_device_id(mf, &dword) != 4) {
      |             ^~~~~~~~~~~~~~
      |             dm_get_device_id

This commit includes mtcr_ul_com.h (where read_device_id
is defined) into tools_dev_types.c to fix the error.

Signed-off-by: Til Kaiser <[email protected]>
@gobenji
Copy link

gobenji commented Feb 7, 2025

Seems like this might fix #1133

@ogalbxela ogalbxela merged commit 049ea9e into Mellanox:master_devel Feb 11, 2025
@tk154 tk154 deleted the build-fixes branch February 11, 2025 09:01
tk154 added a commit to tk154/packages that referenced this pull request Feb 11, 2025
This commit updates the mstflint package to the
latest 4.31.0 release.

It also includes patches to fix some build errors
that have been merged into their development branch [1]
but are not inside the current release version.

[1] Mellanox/mstflint#1131

Signed-off-by: Til Kaiser <[email protected]>
tk154 added a commit to tk154/packages that referenced this pull request Feb 11, 2025
This commit updates the mstflint package to the
latest 4.31.0 release.

It also includes patches to fix some build errors
that have been merged into their development branch [1]
but are not inside the current release version.

[1] Mellanox/mstflint#1131

Signed-off-by: Til Kaiser <[email protected]>
tk154 added a commit to tk154/packages that referenced this pull request Feb 11, 2025
This commit updates the mstflint package to the
latest 4.31.0 release.

It also includes patches to fix some build errors
that have been merged into their development branch [1]
but are not inside the current release version.

[1] Mellanox/mstflint#1131

Signed-off-by: Til Kaiser <[email protected]>
tk154 added a commit to tk154/packages that referenced this pull request Feb 11, 2025
This commit updates the mstflint package to the
latest 4.31.0 release.

It also includes patches to fix some build errors
that have been merged into their development branch [1]
but are not inside the current release version.

[1] Mellanox/mstflint#1131

Signed-off-by: Til Kaiser <[email protected]>
hnyman pushed a commit to openwrt/packages that referenced this pull request Feb 15, 2025
This commit updates the mstflint package to the
latest 4.31.0 release.

It also includes patches to fix some build errors
that have been merged into their development branch [1]
but are not inside the current release version.

[1] Mellanox/mstflint#1131

Signed-off-by: Til Kaiser <[email protected]>
pschmitt pushed a commit to pschmitt/packages that referenced this pull request Feb 20, 2025
This commit updates the mstflint package to the
latest 4.31.0 release.

It also includes patches to fix some build errors
that have been merged into their development branch [1]
but are not inside the current release version.

[1] Mellanox/mstflint#1131

Signed-off-by: Til Kaiser <[email protected]>
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