Skip to content

[MacOS] _dirty_yolo_hack_register ERROR #4

@cinber

Description

@cinber

While trying to build opened from this fork on macOS, I came across the following Error:

I took the upstream projects hombrew opneocd formula and changed the git repo url to this fork.

The command I run is the following:
env HOMEBREW_NO_INSTALL_FROM_API=1 brew install --HEAD --build-from-source --verbose --debug stacksmashing-openocd

It failed to compile with the following error:

libtool: link: ( cd "src/.libs" && rm -f "libopenocd.la" && ln -s "../libopenocd.la" "libopenocd.la" )
/bin/sh ./libtool  --tag=CC   --mode=link clang -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2   -o src/openocd src/main.o src/libopenocd.la  ./jimtcl/libjim.a
libtool: link: clang -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -o src/openocd src/main.o  src/.libs/libopenocd.a -L/opt/homebrew/Cellar/libusb/1.0.26/lib -L/opt/homebrew/Cellar/libftdi/1.5_2/lib -lftdi1 -L/opt/homebrew/Cellar/hidapi/0.14.0/lib -lhidapi -lusb-1.0 -lm ./jimtcl/libjim.a
ld: Undefined symbols:
  _dirty_yolo_hack_register_commands, referenced from:
      _setup_command_handler.command_registrants in libopenocd.a[3](libopenocd_la-openocd.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/openocd] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/git --version
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --version

open-ocd.log

Would appreciate some help.

Tech Specs:
MacOS Sonoma 14.0
Apple Silicon M1 Pro Arm64
bash 5.2.21
gnu make 3.81
autoconf 2.71

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