[L2Ork-dev] Build Issue on OS X Catalina - Build Error due to implicit Function Declaration
Christian Stoerig
christian.stoerig at mailbox.org
Mon Apr 5 09:07:50 EDT 2021
Hi there,
I tried to build the latest release of PD according to the build instructions published here:
(Reason why I tried to build Purr Data from scratch is to get some hands-on experience in building a project like PD - actually both on MacOS and on Linux Fedora)
https://github.com/agraef/purr-data/blob/master/README.md#osx-64-bit-using-homebrew <https://github.com/agraef/purr-data/blob/master/README.md#osx-64-bit-using-homebrew>
Unfortunately, the build process is aborted by showing the following error(s), e.g.:
> s_audio_pa.c:96:23: error: implicit declaration of function 'open' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> int another = open("/dev/null", 0);
The complete terminal output is shown below for further details.
Any suggestions how to resolve this error?
I am bit reluctant to revise the code and to e.g. add a function declaration that is compliant with e.g. C99-cding standards. Thus, I would rather like to ask for alternative workarounds?
I’ve tried to change the compiler language settings within Xcode to ‚C89' for instance (in case of ‚PurrData.xcodeproj‘).
Further details on my host system:
MacOS Version = 10.15.7.
Xcode Version i = Version 12.4 (12D4e)
Xcode Command Line Tools/xcode-select version 2373
Many thanks in advance.
Christian
Complete output from the Terminal:
> (base) USERNAME:purr-data USERNAME$ make
> find: packages/darwin_app/build/usr/share: No such file or directory
> cd l2ork_addons && inst_dir="/usr" ./tar_em_up.sh -Tk
> Pd-L2Ork full installer... IMPORTANT! To ensure you have the most up-to-date submodules, this process requires internet connection to pull sources from various repositories...
> configure.ac:4: warning: The macro `AC_CONFIG_HEADER' is obsolete.
> configure.ac:4: You should run autoupdate.
> ./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
> configure.ac:4: the top level
> configure.ac:60: warning: The macro `AC_HEADER_TIME' is obsolete.
> configure.ac:60: You should run autoupdate.
> ./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
> configure.ac:60: the top level
> configure.ac:63: warning: The macro `AC_HEADER_STDC' is obsolete.
> configure.ac:63: You should run autoupdate.
> ./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
> configure.ac:63: the top level
> configure.ac:68: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
> configure.ac:68: You should run autoupdate.
> ./lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
> configure.ac:68: the top level
> configure.ac:344: warning: The macro `AC_TRY_LINK' is obsolete.
> configure.ac:344: You should run autoupdate.
> ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
> configure.ac:344: the top level
> configure.ac:374: warning: AC_OUTPUT should be used without arguments.
> configure.ac:374: You should run autoupdate.
> installing desktop version...
> Making OSX package (dmg)...
> /Users/USERNAME/purr-data/packages/darwin_app
> rm -rf "/Users/USERNAME/purr-data/packages/darwin_app/build"
> install -d "/Users/USERNAME/purr-data/packages/darwin_app/build"
> rsync -ax /Users/USERNAME/purr-data/pd/nw/nw/nwjs.app/ /Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/
> install -d "/Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/Contents/Resources/app.nw"
> # The nw.js app has its own Info.plist
> install -m0644 -p Info.plist "/Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/Contents"
> install -m0644 -p *.icns "/Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/Contents/Resources"
> # Now change the localized app name in Resources/*.lproj from nwjs
> # to "Purr Data". For some reason "CFBundleDisplayName" doesn't accept
> # spaces so we give it "PurrData"
> for file in /Users/USERNAME/purr-data/packages/darwin_app/build/*.app/Contents/Resources/*.lproj/InfoPlist.strings; do \
> plutil -convert json "$file"; \
> LC_ALL=C sed -i.bak 's/"CFBundleName":"nwjs"/"CFBundleName":"Purr Data"/g' "$file"; \
> LC_ALL=C sed -i.bak 's/"CFBundleDisplayName":"nwjs"/"CFBundleDisplayName":"PurrData"/g' "$file"; \
> rm "$file".bak; \
> plutil -convert binary1 "$file"; \
> done
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/USERNAME/purr-data/packages BUILDLAYOUT_DIR=/Users/USERNAME/purr-data/packages cvs_root_dir=/Users/USERNAME/purr-data prefix= DESTDIR=/Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/Contents/Resources/app.nw OPT_CFLAGS="-fast -fPIC -ftree-vectorize -march=core2 -msse3 -mssse3 -mfpmath=sse" FAT_FLAGS="-mmacosx-version-min=10.9" UNAME=Darwin \
> PD_CONFIGURE_FLAGS="--enable-jack=no --disable-fat" \
> pd_install
> s_version.h unchanged
> cd /Users/USERNAME/purr-data/pd/src && ./configure --enable-jack=no --disable-fat && \
> make OPT_CFLAGS="" depend && \
> make BUILDLAYOUT_DIR=/Users/USERNAME/purr-data/packages cvs_root_dir=/Users/USERNAME/purr-data DESTDIR=/Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/Contents/Resources/app.nw prefix= libpddir= OPT_CFLAGS="-fast -fPIC -ftree-vectorize -march=core2 -msse3 -mssse3 -mfpmath=sse" UNAME=Darwin
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether the compiler supports GNU C... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to enable C11 features... none needed
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether make sets $(MAKE)... yes
> checking how to run the C preprocessor... gcc -E
> checking for an ANSI C-conforming const... yes
> checking for stdio.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for strings.h... yes
> checking for sys/stat.h... yes
> checking for sys/types.h... yes
> checking for unistd.h... yes
> checking for sys/time.h... yes
> checking for pid_t... yes
> checking for size_t... yes
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for fcntl.h... yes
> checking for limits.h... yes
> checking for malloc.h... no
> checking for sys/ioctl.h... yes
> checking for sys/time.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for bstring.h... no
> checking for io.h... no
> checking whether gcc needs -traditional... no
> checking return type of signal handlers... void
> checking for vprintf... yes
> checking for gettimeofday... yes
> checking for select... yes
> checking for socket... yes
> checking for strerror... yes
> checking for working alloca.h... yes
> checking for alloca... yes
> checking for dlopen in -ldl... yes
> checking for sin in -lffm... no
> checking for sin in -lm... yes
> checking for pthread_create in -lpthread... yes
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> -n
> -n
> checking for sinf in -lm... yes
> checking for cosf in -lm... yes
> checking for atanf in -lm... yes
> checking for atan2f in -lm... yes
> checking for sqrtf in -lm... yes
> checking for logf in -lm... yes
> checking for expf in -lm... yes
> checking for fabsf in -lm... yes
> checking for powf in -lm... yes
> configure: creating ./config.status
> config.status: creating makefile
> config.status: creating config.h
> config.status: config.h is unchanged
> cc -DHAVE_LIBDL -DMACOSX -DHAVE_UNISTD_H -I/usr/X11R6/include -I../portaudio/include -I../portaudio/src/common -I../portaudio/src/os/mac_osx/ -I../portmidi/pm_common -I../portmidi/pm_mac -I../portmidi/porttime -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO -DNEWBUFFER -M d_ctl.c d_array.c d_delay.c d_filter.c d_math.c d_osc.c d_soundfile.c g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c g_clone.c g_undo.c g_all_guis.c g_bang.c g_mycanvas.c g_numbox.c g_toggle.c g_vumeter.c g_magicglass.c g_radio.c g_slider.c m_pd.c m_class.c m_obj.c m_atom.c m_memory.c m_binbuf.c m_conf.c m_glob.c m_sched.c s_main.c s_inter.c s_file.c s_print.c s_loader.c s_path.c s_entry.c s_audio.c s_midi.c s_utf8.c d_ugen.c d_arithmetic.c d_dac.c d_misc.c d_fft.c d_global.c d_resample.c x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c x_time.c x_acoustics.c x_net.c x_text.c x_gui.c x_list.c x_array.c x_preset.c x_scalar.c x_vexp.c x_vexp_if.c x_vexp_fun.c import.c s_midi_pm.c s_audio_pa.c s_audio_paring.c ../portaudio/src/common/pa_allocation.c ../portaudio/src/common/pa_converters.c ../portaudio/src/common/pa_cpuload.c ../portaudio/src/common/pa_dither.c ../portaudio/src/common/pa_front.c ../portaudio/src/common/pa_process.c ../portaudio/src/common/pa_stream.c ../portaudio/src/common/pa_trace.c ../portaudio/src/common/pa_debugprint.c ../portaudio/src/common/pa_ringbuffer.c ../portaudio/src/os/unix/pa_unix_util.c ../portaudio/src/os/mac_osx/pa_mac_hostapis.c ../portaudio/src/hostapi/coreaudio/pa_mac_core.c ../portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c ../portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c ../portmidi/pm_mac/pmmac.c ../portmidi/pm_mac/pmmacosxcm.c ../portmidi/pm_mac/finddefault.c ../portmidi/pm_mac/readbinaryplist.c ../portmidi/pm_common/pmutil.c ../portmidi/pm_common/portmidi.c ../portmidi/porttime/ptmacosx_cf.c d_fft_mayer.c d_fftroutine.c > makefile.dependencies
> make[3]: Nothing to be done for `depend'.
> cc -mmacosx-version-min=10.9 -DPD -Wall -W -Wstrict-prototypes -Wno-unused-parameter -Wno-parentheses -Wno-switch -Wno-cast-function-type -DHAVE_LIBDL -DMACOSX -DHAVE_UNISTD_H -I/usr/X11R6/include -I../portaudio/include -I../portaudio/src/common -I../portaudio/src/os/mac_osx/ -I../portmidi/pm_common -I../portmidi/pm_mac -I../portmidi/porttime -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO -DNEWBUFFER -DMACOSX3 -DPA_BIG_ENDIAN -Wno-error -O2 -fast -fPIC -ftree-vectorize -march=core2 -msse3 -mssse3 -mfpmath=sse -DINSTALL_PREFIX=\"\" -c -o ../obj/s_audio_pa.o s_audio_pa.c
> clang: warning: argument unused during compilation: '-fast' [-Wunused-command-line-argument]
> warning: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Wunknown-warning-option]
> s_audio_pa.c:96:23: error: implicit declaration of function 'open' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> int another = open("/dev/null", 0);
> ^
> s_audio_pa.c:232:12: warning: unused variable 'bytesPerSample' [-Wunused-variable]
> long bytesPerSample;
> ^
> 2 warnings and 1 error generated.
> make[3]: *** [s_audio_pa.o] Error 1
> make[2]: [pd] Error 2 (ignored)
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/USERNAME/purr-data/pd/src BUILDLAYOUT_DIR=/Users/USERNAME/purr-data/packages cvs_root_dir=/Users/USERNAME/purr-data DESTDIR=/Users/USERNAME/purr-data/packages/darwin_app/build/Pd-l2ork.app/Contents/Resources/app.nw prefix= libpddir= OPT_CFLAGS="-fast -fPIC -ftree-vectorize -march=core2 -msse3 -mssse3 -mfpmath=sse" UNAME=Darwin install
> cc -mmacosx-version-min=10.9 -DPD -Wall -W -Wstrict-prototypes -Wno-unused-parameter -Wno-parentheses -Wno-switch -Wno-cast-function-type -DHAVE_LIBDL -DMACOSX -DHAVE_UNISTD_H -I/usr/X11R6/include -I../portaudio/include -I../portaudio/src/common -I../portaudio/src/os/mac_osx/ -I../portmidi/pm_common -I../portmidi/pm_mac -I../portmidi/porttime -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO -DNEWBUFFER -DMACOSX3 -DPA_BIG_ENDIAN -Wno-error -O2 -fast -fPIC -ftree-vectorize -march=core2 -msse3 -mssse3 -mfpmath=sse -DINSTALL_PREFIX=\"\" -c -o ../obj/s_audio_pa.o s_audio_pa.c
> clang: warning: argument unused during compilation: '-fast' [-Wunused-command-line-argument]
> warning: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Wunknown-warning-option]
> s_audio_pa.c:96:23: error: implicit declaration of function 'open' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> int another = open("/dev/null", 0);
> ^
> s_audio_pa.c:232:12: warning: unused variable 'bytesPerSample' [-Wunused-variable]
> long bytesPerSample;
> ^
> 2 warnings and 1 error generated.
> make[3]: *** [s_audio_pa.o] Error 1
> make[2]: *** [pd_install] Error 2
> make[1]: *** [darwin_app_core] Error 2
> copying pd-l2ork-specific externals...
> done with l2ork addons.
> mv: rename packages/darwin_app/Pd*.dmg to ./Pd*.dmg: No such file or directory
> ./tar_em_up.sh: 429: command failed with exit code 1, exiting now.
> ./tar_em_up.sh: 429: mv packages/darwin_app/Pd*.dmg .
> make: *** [all] Error 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20210405/294677f1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1427 bytes
Desc: not available
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20210405/294677f1/attachment-0001.bin>
More information about the L2Ork-dev
mailing list