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

Fix: macos compatibility #673

Closed
wants to merge 1 commit into from
Closed

Fix: macos compatibility #673

wants to merge 1 commit into from

Conversation

OLFDB
Copy link

@OLFDB OLFDB commented Oct 9, 2022

For macos autogen.sh has to be started with --prefix=/opt/local .

There is still an issue with target install-data-hook, but ebusd and tools are working.
I did a quick check building and installing on Debian. That still works, but I didn't test the result.

The VERSION needed to be renamed, as it was generating errors when was imported.

@john30
Copy link
Owner

john30 commented Jan 6, 2023

should be fixed with commit to #650 , please check

#define BAUDRATE_HIGH B921600
#else
#define BAUDRATE_HIGH 230400
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MacSDK's termios.h in /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/termios.h shows these definitions at line 316:

#endif

/*
 * Standard speeds
 */
#define B0      0
#define B50     50
#define B75     75
#define B110    110
#define B134    134
#define B150    150
#define B200    200
#define B300    300
#define B600    600
#define B1200   1200
#define B1800   1800
#define B2400   2400
#define B4800   4800
#define B9600   9600
#define B19200  19200
#define B38400  38400
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define B7200   7200
#define B14400  14400
#define B28800  28800
#define B57600  57600
#define B76800  76800
#define B115200 115200
#define B230400 230400
#define EXTA    19200
#define EXTB    38400
#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */


#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)

I assumed the highest baudrate reliably supported is 230400.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIR on Darwin you have to use IOSSIOSPEED to set non-standard speed and it works at least on FTDI for the 921600

@wimleers
Copy link

wimleers commented May 9, 2023

When trying to compile on macOS:

admin@mist ebusd % cmake .
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for netdb.h
-- Looking for netdb.h - found
-- Looking for poll.h
-- Looking for poll.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/select.h
-- Looking for sys/select.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - not found
-- Looking for pselect
-- Looking for pselect - not found
-- Looking for ppoll
-- Looking for ppoll - not found
-- Looking for linux/serial.h
-- Looking for linux/serial.h - not found
-- Looking for dev/usb/uftdiio.h
-- Looking for dev/usb/uftdiio.h - not found
-- Looking for argp_parse
-- Looking for argp_parse - not found
CMake Error at CMakeLists.txt:79 (message):
  argp library not available


-- Configuring incomplete, errors occurred!

Note that all I really want is ebusctl for john30/ebusd-configuration#316 (comment), because I am running ebusd in Docker.

@OLFDB
Copy link
Author

OLFDB commented May 10, 2023

You are missing a library. Use brew install argp-standalone to add it.

@john30 john30 closed this in d89b7cf Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants