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

Mac ./configure #205

Open
illume opened this issue Jun 2, 2019 · 13 comments
Open

Mac ./configure #205

illume opened this issue Jun 2, 2019 · 13 comments
Assignees
Labels

Comments

@illume
Copy link

illume commented Jun 2, 2019

This is where it gets up to...

configure: The PKG_CONFIG_PATH variable was not set
configure: You should set it to the directories that contain the .pc files
checking for pthread_create in -lpthread... yes
checking for pthread_attr_getstacksize... yes
checking for snd_seq_open in -lasound... no
checking alsa/asoundlib.h usability... no
checking alsa/asoundlib.h presence... no
checking for alsa/asoundlib.h... no
configure: error: alsa/asoundlib.h not found - please install the alsa header
@game-stop game-stop self-assigned this Jun 4, 2019
@game-stop
Copy link
Owner

Except for this particular error:

  • review configure.ac for veejay server dependencies and remove them
  • split vj-net into standalone library (currently this is a convenience library in veejay-server)
  • update configure.ac to use libvjnet

@game-stop
Copy link
Owner

ALSA sequencer is included for MIDI support, @d-j-a-y , do you know a MIDI library that has support for both platforms? Otherwise, MIDI support will not be included in the first MacOS version of reloaded

@illume
Copy link
Author

illume commented Jun 13, 2019

Hello. Leaving out midi for the first release sounds like a good plan :)

portmidi works well enough across at least mac/win/linux.

Let me know if you need any help with compiling on a mac, or help with portmidi (if that's the way you choose).

cheerio!

@d-j-a-y
Copy link
Collaborator

d-j-a-y commented Jun 14, 2019

found https://github.com/thestk/rtmidi (MIT license)

RtMidi is a set of C++ classes (RtMidiIn, RtMidiOut, and API specific classes) that provide a common API (Application Programming Interface) for realtime MIDI input/output across Linux (ALSA, JACK), Macintosh OS X (CoreMIDI, JACK), and Windows (Multimedia Library) operating systems.

@game-stop
Copy link
Owner

@illume , @d-j-a-y I have seperated shared code between veejay-server and veejay-client, this now lives in the veejay-core package. Also, ALSA midi is optionally included if ALSA is found on the system.

@illume, can you give it a try and see if it compiles ? The packages you need are

  • veejay-core (./autogen.sh && ./configure && make && make install )
  • veejay-client (./autogen.sh && ./configure && make && make install )

To build veejay-server, veejay-core must be build as well (ofc)

@d-j-a-y
Copy link
Collaborator

d-j-a-y commented Jun 15, 2019

Is it "normal" that build inclusion of client/vj-midi.c is now out of configure option ?
https://github.com/c0ntrol/veejay/blob/3c94ceff7820f1af07dfae716267a64afa710e9e/veejay-current/veejay-client/src/Makefile.am#L12

@game-stop
Copy link
Owner

Is it "normal" that build inclusion of client/vj-midi.c is now out of configure option ?
https://github.com/c0ntrol/veejay/blob/3c94ceff7820f1af07dfae716267a64afa710e9e/veejay-current/veejay-client/src/Makefile.am#L12

files could be optionally added to _SOURCES, but I used preprocessor macro. This you see everywhere in veejay

@illume
Copy link
Author

illume commented Jun 16, 2019

Hello,

for veejay-core, I get this error...

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/local/include -I../thirdparty -I../libvjmsg -O3 -ffast-math -ftree-vectorize -m64 -fPIC -DPIC -march=native -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused -fno-stack-protector -MT memcpy.lo -MD -MP -MF .deps/memcpy.Tpo -c memcpy.c  -fno-common -DPIC -o .libs/memcpy.o
memcpy.c:538:11: warning: unused variable 'm' [-Wunused-variable]
        uint8_t *m = (uint8_t*) &ppmask;
                 ^
memcpy.c:591:34: error: use of undeclared identifier 'SSE_MMREG_SIZE'
        delta = ((uintptr_t)to)&(SSE_MMREG_SIZE-1);
                                 ^
memcpy.c:594:19: error: use of undeclared identifier 'SSE_MMREG_SIZE'
            delta=SSE_MMREG_SIZE-delta;
                  ^
1 warning and 2 errors generated.
make[2]: *** [memcpy.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
From the configure...
checking Architecture... x86_64
checking sub-architecture settings... clang: error: unsupported option '--help=target'
clang: error: no input files
-march=native
checking for MMX on processor(s)... grep: /proc/cpuinfo: No such file or directory
no
checking for SSE on processor(s)... grep: /proc/cpuinfo: No such file or directory
no
checking for SSE2 on processor(s)... grep: /proc/cpuinfo: No such file or directory
no
checking for 3DNOW on processor(s)... grep: /proc/cpuinfo: No such file or directory
no
checking for CMOV on processor(s)... grep: /proc/cpuinfo: No such file or directory
no
checking for MMX2 on processor(s)... grep: /proc/cpuinfo: No such file or directory
no
checking for AVX on processor(s)... grep: /proc/cpuinfo: No such file or directory
no

Mac has a command for getting the CPU features...

$ sysctl machdep.cpu.features 
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C

$ sysctl machdep.cpu.features | tr '[:upper:]' '[:lower:]' | tr ":" "\n" | tail -1
 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clfsh ds acpi mmx fxsr sse sse2 ss htt tm pbe sse3 pclmulqdq dtes64 mon dscpl vmx smx est tm2 ssse3 fma cx16 tpr pdcm sse4.1 sse4.2 x2apic movbe popcnt aes pcid xsave osxsave seglim64 tsctmr avx1.0 rdrand f16c

@game-stop
Copy link
Owner

game-stop commented Jun 16, 2019

Would be great if you can post the output of ./configure; I need to update it , so CPU flags detection works for your OS; I have updated the configure script (veejay-core) and instead of detecting flags, I am setting flags common for intel CPUs used by apple

game-stop added a commit that referenced this issue Jun 16, 2019
game-stop added a commit that referenced this issue Jun 16, 2019
@game-stop
Copy link
Owner

Dropped aclib from veejay-core

@d-j-a-y
Copy link
Collaborator

d-j-a-y commented Jul 8, 2019

@C0ntrol : that issue should be flagged for next release ... is't it ?

@illume
Copy link
Author

illume commented Jul 8, 2019

Hello!

./autogen.sh
./configure

MSG_NOSIGNAL

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/local/include -I../thirdparty -I../libyuv -I../vjmem -I../vjmsg -O3 -ffast-math -ftree-vectorize -m64 -fPIC -DPIC -march=native -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused -fno-stack-protector -MT mcastreceiver.lo -MD -MP -MF .deps/mcastreceiver.Tpo -c mcastreceiver.c -o mcastreceiver.o >/dev/null 2>&1
depbase=`echo cmd.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I/usr/local/include -I../thirdparty -I../libyuv -I../vjmem -I../vjmsg   -O3 -ffast-math -ftree-vectorize -m64 -fPIC -DPIC -march=native  -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused  -fno-stack-protector -MT cmd.lo -MD -MP -MF $depbase.Tpo -c -o cmd.lo cmd.c &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/local/include -I../thirdparty -I../libyuv -I../vjmem -I../vjmsg -O3 -ffast-math -ftree-vectorize -m64 -fPIC -DPIC -march=native -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused -fno-stack-protector -MT cmd.lo -MD -MP -MF .deps/cmd.Tpo -c cmd.c  -fno-common -DPIC -o .libs/cmd.o
cmd.c:66:6: warning: implicit declaration of function 'gethostbyname_r' is invalid in C99 [-Wimplicit-function-declaration]
        if (gethostbyname_r(name, &(current->hostent), current->h_addr_space,sizeof(current->h_addr_space),&result, &local_errno)) {
            ^
cmd.c:290:39: error: use of undeclared identifier 'MSG_NOSIGNAL'
                n = send( s->sock_fd, buf, length , MSG_NOSIGNAL );
                                                    ^
cmd.c:312:31: error: use of undeclared identifier 'MSG_NOSIGNAL'
                n = send( fd, ptr, length , MSG_NOSIGNAL );
                                            ^
1 warning and 2 errors generated.
make[2]: *** [cmd.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Here is the output of configure.

16:55:59-rene~/dev/pygame/veejay/veejay-current/veejay-core (master)$ ./configure 
checking build system type... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking target system type... x86_64-apple-darwin17.7.0
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin17.7.0 file names to x86_64-apple-darwin17.7.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.7.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gawk... (cached) gawk
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -ll
checking whether yytext is a pointer... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether ln -s works... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking dependency style of gcc... gcc3
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/types.h... (cached) yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for posix_memalign... yes
checking for memalign... no
checking for fmax... yes
checking for lround... yes
checking for pow... yes
checking for bzero... yes
checking for gettimeofday... yes
checking for memset... yes
checking for mmap... yes
checking for strndup... yes
checking for strstr... yes
checking for strncasecmp... yes
checking for sched_get_priority_max... yes
checking for select... yes
checking for socket... yes
checking for getpagesize... yes
checking for memcpy... yes
checking for getopt_long... yes
checking size of int... 4
checking size of long int... 8
checking size of size_t... 8
checking size of float... 4
checking for library containing clock_gettime... none required
checking return type of signal handlers... void
configure: The host is x86_64-apple-darwin17.7.0  x86_64  apple  darwin17.7.0 .
configure: The PKG_CONFIG_PATH variable was not set
configure: You should set it to the directories that contain the .pc files
checking whether to compile in debugging information... no
checking whether to compile in profiling information... no
checking whether to compile in assertion checking... no
no
checking whether to compile in vevo port tracking... no
checking Architecture... x86_64
checking sub-architecture settings... clang: error: unsupported option '--help=target'
clang: error: no input files
-march=native
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libpng... yes
checking for libqrencode >= 3.4.2... no
configure: WARNING: libqrencode is not present
checking for glib-2.0 >= 2.4... yes
checking for libavutil >= 49.7.0... yes
checking for libavcodec >= 51.35.2... yes
checking for libavformat >= 52.14.0... yes
checking for libswscale >= 0.7.1... yes
checking for clock_gettime in -lrt... no
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking for __progname... yes
checking what warning flags to pass to the C compiler... checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating thirdparty/Makefile
config.status: creating thirdparty/mjpegtools/Makefile
config.status: creating thirdparty/fastarm/Makefile
config.status: creating thirdparty/libhash/Makefile
config.status: creating thirdparty/liblzo/Makefile
config.status: creating libvjmsg/Makefile
config.status: creating libvevo/Makefile
config.status: creating libvjmem/Makefile
config.status: creating libvjnet/Makefile
config.status: creating libyuv/Makefile
config.status: creating veejaycore/Makefile
config.status: creating veejaycore.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: 
configure:  Veejay-Core 1.5.65 build configuration :
configure: 
configure:  Compiler flags: -march=native  -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused  -fno-stack-protector
configure:    architecture: auto
configure: 
configure:  Architecture: x86_64 
configure: 
configure:    x86  
configure:     MMX     enabled     : yes
configure:     MMX2    enabled     : 
configure:     SSE     enabled     : yes
configure:     SSE2    enabled     : yes
configure:     3DNOW   enabled     : 
configure:     CMOV    enabled     : yes
configure:     AVX     enabled     : 
configure: 
configure:    Platform: Darwin
configure:       Good luck! You can be the first! 
configure: 
configure:  Required dependencies:
configure:   - POSIX Threads (pthread)       : true
configure:   - FFmpeg/AV AVFormat            : true 
configure:   - FFmpeg/AV AVCodec             : true 
configure:   - FFmpeg/AV Swscaler            : true 
configure:   - FFmpeg/AV AVUtil              : true 

To get it to compile (incorrectly)...

#ifndef MSG_NOSIGNAL
#if (defined(__APPLE__) && defined(__MACH__))
#define MSG_NOSIGNAL 0
#endif
#endif

Probably the better way is like this:
https://nwat.xyz/blog/2014/01/16/porting-msg_more-and-msg_nosigpipe-to-osx/

statfs

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/local/include -DG_LOG_DOMAIN=\"veejaycore\" -DVEEJAYCORE_VERSION=\"1.5.65\" -I../thirdparty/mjpegtools -I /usr/X11R6/include -I../thirdparty -I../libvjmem -I../libvjlzo -I../libvjmsg -I../libvjnet -I/libyuv -I../libvevo -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/glib/2.58.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.58.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.42/include -O3 -ffast-math -ftree-vectorize -m64 -fPIC -DPIC -march=native -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused -fno-stack-protector -MT vj-task.lo -MD -MP -MF .deps/vj-task.Tpo -c vj-task.c  -fno-common -DPIC -o .libs/vj-task.o
vj-task.c:42:10: fatal error: 'sys/statfs.h' file not found
#include <sys/statfs.h>
         ^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [vj-task.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Perhaps don't include it in veejaycore/vj-task.c...

#if !(defined(__APPLE__) && defined(__MACH__))
#include <sys/statfs.h>
#endif

https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/statfs.2.html

cpu_set_t

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/local/include -DG_LOG_DOMAIN=\"veejaycore\" -DVEEJAYCORE_VERSION=\"1.5.65\" -I../thirdparty/mjpegtools -I /usr/X11R6/include -I../thirdparty -I../libvjmem -I../libvjlzo -I../libvjmsg -I../libvjnet -I/libyuv -I../libvevo -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/ffmpeg/4.1_1/include -I/usr/local/Cellar/glib/2.58.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.58.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.42/include -O3 -ffast-math -ftree-vectorize -m64 -fPIC -DPIC -march=native -no-cpp-precomp -m64 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -Wunused -fno-stack-protector -MT vj-task.lo -MD -MP -MF .deps/vj-task.Tpo -c vj-task.c  -fno-common -DPIC -o .libs/vj-task.o
vj-task.c:263:2: error: use of undeclared identifier 'cpu_set_t'
        cpu_set_t cpuset;
        ^
vj-task.c:277:4: warning: implicit declaration of function 'CPU_ZERO' is invalid in C99 [-Wimplicit-function-declaration]
                        CPU_ZERO(&cpuset);
                        ^
vj-task.c:277:14: error: use of undeclared identifier 'cpuset'
                        CPU_ZERO(&cpuset);
                                  ^
vj-task.c:278:4: warning: implicit declaration of function 'CPU_SET' is invalid in C99 [-Wimplicit-function-declaration]
                        CPU_SET( selected_cpu, &cpuset );
                        ^
vj-task.c:278:28: error: use of undeclared identifier 'cpuset'
                        CPU_SET( selected_cpu, &cpuset );
                                                ^
vj-task.c:280:7: warning: implicit declaration of function 'pthread_attr_setaffinity_np' is invalid in C99
      [-Wimplicit-function-declaration]
                        if(pthread_attr_setaffinity_np( &p_attr[i], sizeof(cpuset), &cpuset ) != 0 )
                           ^
vj-task.c:280:55: error: use of undeclared identifier 'cpuset'
                        if(pthread_attr_setaffinity_np( &p_attr[i], sizeof(cpuset), &cpuset ) != 0 )
                                                                           ^
vj-task.c:280:65: error: use of undeclared identifier 'cpuset'
                        if(pthread_attr_setaffinity_np( &p_attr[i], sizeof(cpuset), &cpuset ) != 0 )
                                                                                     ^
3 warnings and 5 errors generated.
make[2]: *** [vj-task.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Maybe this is useful? Binding threads to cores on macos

I ifdef'd it out and continued...

gethostbyname_r

From man gethostbyname on macos...

These functions use a thread-specific data storage; if the data is needed for future use, it should be copied before any subsequent calls overwrite it.
Though these functions are thread-safe, still it is recommended to use the getaddrinfo(3) family of functions, instead.

So maybe gethostbyname can be used on mac.

libvjnet/cmd.c

#if (defined(__APPLE__) && defined(__MACH__))
    return gethostbyname(name);
#else
    struct hostent *result;
    int local_errno;
    
    pthread_once(&ghbn_key_once, create_ghbn_key);
    
    struct host_list *current = (struct host_list *) pthread_getspecific(ghbn_key);
    
    if (!current) {
        current = (struct host_list *) calloc(1, sizeof(struct host_list));
        current->hostent.h_name = "busy";
            ref_count++;
        pthread_setspecific(ghbn_key, current);
    }
    
    if (gethostbyname_r(name, &(current->hostent), current->h_addr_space,sizeof(current->h_addr_space),&result, &local_errno)) {
        h_errno = local_errno;
    }
    return result;
#endif
}

And with that... make in veejay-core finished building without error.

game-stop added a commit that referenced this issue Jul 8, 2019
…n error, declare MSG_NOSIGNAL and set SO_NOSIGPIPE
game-stop added a commit that referenced this issue Jul 8, 2019
@game-stop
Copy link
Owner

Thanks @illume , that was a great help!

I have modified veejay-core and referenced the commits.
When you can, please try to rebuild. However, with the changes you did you should be able to link when building reloaded. How far did you get with veejay-client ?

d-j-a-y pushed a commit to d-j-a-y/veejay that referenced this issue Aug 4, 2019
… socket on error, declare MSG_NOSIGNAL and set SO_NOSIGPIPE
d-j-a-y pushed a commit to d-j-a-y/veejay that referenced this issue Aug 4, 2019
d-j-a-y pushed a commit to d-j-a-y/veejay that referenced this issue Aug 4, 2019
d-j-a-y pushed a commit to d-j-a-y/veejay that referenced this issue Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants