Skip to content

corenetwork,stack: fix: receiveSignal() overrides take intval_t, not long (macOS build) - #314

Closed
anies1212 wants to merge 1 commit into
Unipisa:masterfrom
anies1212:fix/macos-receivesignal-intval
Closed

anies1212 wants to merge 1 commit into
Unipisa:masterfrom
anies1212:fix/macos-receivesignal-intval

Conversation

@anies1212

Copy link
Copy Markdown

Fixes #313.

cListener::receiveSignal() takes intval_t (int64_t). Five overrides declare that parameter as long. On Linux int64_t is long, so they compile and CI passes; on macOS it is long long, so they declare a new overload, and override makes that an error. This PR declares the parameter as omnetpp::intval_t in:

  • src/simu5g/corenetwork/coreControl/CoreControl.h / .cc
  • src/simu5g/stack/d2d/binder/D2dBinder.h / .cc
  • src/simu5g/stack/d2d/mac/amc/D2dAmc.h

This is the same change as #312, which its author closed without it being merged.

No behaviour change on Linux

On Linux omnetpp::intval_t and long are the same type, so the change does not affect the compiled code there. The fingerprint workflow passes on this branch in my fork, with the recorded fingerprints unchanged: 222/222 in release and 222/222 in debug mode (https://github.com/anies1212/Simu5G/actions/runs/42612321033).

Tested on macOS

macOS 26.6.2 (arm64), Apple clang 17.0.0, OMNeT++ 6.4.0, INET 4.7.0:

  • Simu5G builds in release and debug mode (before this change, neither mode builds)
  • simulations/nr/standalone -c VoIP-DL and simulations/nr/standalone_multicell -c CBR-DL run to the end
  • tests/fingerprint/fingerprints (release): all 222 configurations run to completion, with no errors

Note: on macOS, 114 of the 222 fingerprints differ from the recorded (Linux) values: sz in 107, tplx and tilx in 45 each, ~tNl in 38. Without this change Simu5G does not build on macOS, so there is no "before" to compare these with, and I have not looked into where the difference comes from. I'm mentioning it in case it's useful; I don't think it is caused by this change.

…long (macOS build)

cListener::receiveSignal() takes intval_t (int64_t). On Linux int64_t is
long, so the overrides declared with a long parameter compile; on macOS it
is long long, so they declare a new overload instead, and 'override' makes
that an error. The build fails in CoreControl, D2dBinder and D2dAmc.

The parameter is declared as omnetpp::intval_t, the base class's type. On
Linux this is the same type as before, so nothing changes there.
@anies1212

Copy link
Copy Markdown
Author

Thanks! Closing in favour of 57974ee on v1.8.x.

@anies1212 anies1212 closed this Nov 9, 2026
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.

Build fails on macOS: receiveSignal() overrides declare long instead of intval_t

1 participant