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

beep_face causes build failure #472

Closed
CarpeNoctem opened this issue Sep 10, 2024 · 1 comment · Fixed by #469
Closed

beep_face causes build failure #472

CarpeNoctem opened this issue Sep 10, 2024 · 1 comment · Fixed by #469
Assignees
Labels
bug Something isn't working next This feature or pull request is present in the next branch watch-face Related to a new or existing watch face

Comments

@CarpeNoctem
Copy link
Contributor

Testing out the next branch, and beep_face causes the build to fail for both firmware and for the simulator.

Branch: next
Revision: 44b5434
Board color: GREEN

Customizations: Only adding the below faces list to movement_config.h

const watch_face_t watch_faces[] = {
    simple_clock_face,
    world_clock2_face,
    french_revolutionary_face,
    alarm_face,
    timer_face,
    stock_stopwatch_face,
    tachymeter_face,
    sunrise_sunset_face,
    moon_phase_face,
    minimal_clock_face, // Helping test these from next branch
    close_enough_clock_face,
    countdown_face,
    alarm_thermometer_face,
    beeps_face,
    higher_lower_game_face,
    thermistor_readout_face, // These last 6 via long press from simple_clock_face
    voltage_face,
    preferences_face,
    set_time_face,
    finetune_face,
    nanosec_face
};

Hardware FW build errors:

LD build/watch.elf
/usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: ./build/movement.o:(.rodata.watch_faces+0x104): undefined reference to `beeps_face_setup'
/usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: ./build/movement.o:(.rodata.watch_faces+0x108): undefined reference to `beeps_face_activate'
/usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: ./build/movement.o:(.rodata.watch_faces+0x10c): undefined reference to `beeps_face_loop'
/usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: ./build/movement.o:(.rodata.watch_faces+0x110): undefined reference to `beeps_face_resign'
Memory region         Used Size  Region Size  %age Used
      bootloader:          0 GB         8 KB      0.00%
             rom:      131760 B       240 KB     53.61%
          eeprom:          0 GB         8 KB      0.00%
             ram:       15824 B        32 KB     48.29%
collect2: error: ld returned 1 exit status
make: *** [../../rules.mk:27: build/watch.elf] Error 1

Simulator build errors:

[...]
HTML build-sim/watch.html
error: undefined symbol: beeps_face_activate (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _beeps_face_activate may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: beeps_face_loop (referenced by top-level compiled C/C++ code)
warning: _beeps_face_loop may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: beeps_face_resign (referenced by top-level compiled C/C++ code)
warning: _beeps_face_resign may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: beeps_face_setup (referenced by top-level compiled C/C++ code)
warning: _beeps_face_setup may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
emcc: error: '/usr/bin/node /usr/share/emscripten/src/compiler.js /tmp/tmp14ordblc.json' failed (returned 1)
make: *** [../../rules.mk:19: build-sim/watch.html] Error 1
emmake: error: 'make COLOR=GREEN' failed (returned 2)
@CarpeNoctem
Copy link
Contributor Author

Found it: It was added to movement_faces.h, but not to the Makefile. Adding it to the latter resolves this.

user@a34e984b5762:/tmp/Sensor-Watch/movement/make$ git diff Makefile 
diff --git a/movement/make/Makefile b/movement/make/Makefile
index 42c3106..a310c99 100644
--- a/movement/make/Makefile
+++ b/movement/make/Makefile
@@ -68,6 +68,7 @@ SRCS += \
   ../watch_faces/demo/lis2dw_logging_face.c \
   ../watch_faces/demo/demo_face.c \
   ../watch_faces/demo/hello_there_face.c \
+  ../watch_faces/demo/beeps_face.c \
   ../watch_faces/complication/pulsometer_face.c \
   ../watch_faces/complication/day_one_face.c \
   ../watch_faces/complication/stopwatch_face.c \

@matheusmoreira matheusmoreira self-assigned this Sep 10, 2024
@matheusmoreira matheusmoreira added next This feature or pull request is present in the next branch watch-face Related to a new or existing watch face bug Something isn't working labels Sep 10, 2024
matheusmoreira added a commit that referenced this issue Sep 10, 2024
PR #386 did not add the C file to the makefile,
causing the build to fail at the link stage
due to the missing object file and the symbols
that were supposed to be provided by it.

Adding the file to the build fixes the issue.

Reported-by: CarpeNoctem <[email protected]>
Fixed-by: CarpeNoctem <[email protected]>
Reviewed-by: Matheus Afonso Martins Moreira <[email protected]>
GitHub-Issue: #472
Fixes: #472
@matheusmoreira matheusmoreira linked a pull request Sep 10, 2024 that will close this issue
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next This feature or pull request is present in the next branch watch-face Related to a new or existing watch face
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants