# Sleuthkit 4.14.0 error: use of undeclared identifier 'libewf\_handle\_read\_random'

**URL:** <https://sleuthkit.discourse.group/t/sleuthkit-4-14-0-error-use-of-undeclared-identifier-libewf-handle-read-random/5419>\
**Category:** The Sleuth Kit Development\
**Created:** [April 16, 2025, 12:44pm UTC](https://sleuthkit.discourse.group/t/sleuthkit-4-14-0-error-use-of-undeclared-identifier-libewf-handle-read-random/5419 "2025-04-16T12:44:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marius\_Schamschula](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/marius_schamschula/32/2165_2.png) [@Marius\_Schamschula](https://sleuthkit.discourse.group/u/Marius_Schamschula)\
**Post date:** [April 16, 2025, 12:44pm UTC](https://sleuthkit.discourse.group/t/sleuthkit-4-14-0-error-use-of-undeclared-identifier-libewf-handle-read-random/5419/1 "2025-04-16T12:44:20Z")

</div>

I’m getting

```auto
libtool: compile: ccache /usr/bin/clang -DHAVE_CONFIG_H -I. -I../../tsk -I../.. -I./../.. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-parameter -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -MT vhd.lo -MD -MP -MF .deps/vhd.Tpo -c vhd.c -o vhd.o >/dev/null 2>&1
mv -f .deps/img_types.Tpo .deps/img_types.Plo
mv -f .deps/vmdk.Tpo .deps/vmdk.Plo
mv -f .deps/logical_img.Tpo .deps/logical_img.Plo
mv -f .deps/img_writer.Tpo .deps/img_writer.Plo
mv -f .deps/unsupported_types.Tpo .deps/unsupported_types.Plo
mv -f .deps/mult_files.Tpo .deps/mult_files.Plo
mv -f .deps/img_io.Tpo .deps/img_io.Plo
mv -f .deps/aff.Tpo .deps/aff.Plo
mv -f .deps/raw.Tpo .deps/raw.Plo
mv -f .deps/vhd.Tpo .deps/vhd.Plo
ewf.cpp:70:11: error: use of undeclared identifier 'libewf_handle_read_random'; did you mean 'libewf_handle_get_track'?
   70 | cnt = libewf_handle_read_random(ewf_info->handle,
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~
      | libewf_handle_get_track
/opt/local/include/libewf.h:1013:5: note: 'libewf_handle_get_track' declared here
 1013 | int libewf_handle_get_track(
      | ^
ewf.cpp:71:9: error: cannot initialize a parameter of type 'uint32_t' (aka 'unsigned int') with an lvalue of type 'char *'
   71 | buf, len, offset, &ewf_error);
      | ^~~
/opt/local/include/libewf.h:1015:15: note: passing argument to parameter 'index' here
 1015 | uint32_t index,
      | ^
2 errors generated.

```

While building sleuthkit 4.14.0 under macOS 14.7.3 with Xcode 16.2 to update the MacPorts Portfile.

This same issue has previously popped up. The same patch was needed for version 4.6.2. See

> <https://github.com/macports/macports-ports/commit/20cc04958bd6ed40c1f24d24bee69278cc0353fe>
