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

builds on M1 mac #23048

Merged
merged 1 commit into from
Dec 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ else:
"/opt/homebrew/lib",
"/usr/local/opt/openssl/lib",
"/opt/homebrew/opt/openssl/lib",
f"#third_party/acados/{arch}/lib",
"/System/Library/Frameworks/OpenGL.framework/Libraries",
]
cflags += ["-DGL_SILENCE_DEPRECATION"]
Expand Down
5 changes: 3 additions & 2 deletions selfdrive/controls/lib/lateral_mpc_lib/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ lenv.Clean(generated_files, Dir(gen))

lenv.Command(generated_files,
["lat_mpc.py"],
f"cd {Dir('.').abspath} && python lat_mpc.py")
f"cd {Dir('.').abspath} && python3 lat_mpc.py")

lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")
lenv["CCFLAGS"].append("-Wno-unused")
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
if arch != "Darwin":
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
lib_solver = lenv.SharedLibrary(f"{gen}/acados_ocp_solver_lat",
build_files,
LIBS=['m', 'acados', 'hpipm', 'blasfeo', 'qpOASES_e'])
Expand Down
5 changes: 3 additions & 2 deletions selfdrive/controls/lib/longitudinal_mpc_lib/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ lenv.Clean(generated_files, Dir(gen))

lenv.Command(generated_files,
["long_mpc.py"],
f"cd {Dir('.').abspath} && python long_mpc.py")
f"cd {Dir('.').abspath} && python3 long_mpc.py")

lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")
lenv["CCFLAGS"].append("-Wno-unused")
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
if arch != "Darwin":
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
lib_solver = lenv.SharedLibrary(f"{gen}/acados_ocp_solver_long",
build_files,
LIBS=['m', 'acados', 'hpipm', 'blasfeo', 'qpOASES_e'])
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/ui/qt/widgets/cameraview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const char frame_fragment_shader[] =
"#version 150 core\n"
#else
"#version 300 es\n"
#endif
"precision mediump float;\n"
#endif
"uniform sampler2D uTexture;\n"
"in vec4 vTexCoord;\n"
"out vec4 colorOut;\n"
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/ui/replay/framereader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ struct buffer_data {

int readPacket(void *opaque, uint8_t *buf, int buf_size) {
struct buffer_data *bd = (struct buffer_data *)opaque;
buf_size = std::min((size_t)buf_size, bd->size - bd->offset);
assert(bd->offset <= bd->size);
buf_size = std::min((size_t)buf_size, (size_t)(bd->size - bd->offset));
if (!buf_size) return AVERROR_EOF;

memcpy(buf, bd->data + bd->offset, buf_size);
Expand Down
Binary file added third_party/acados/Darwin/lib/libacados.dylib
Binary file not shown.
Binary file added third_party/acados/Darwin/lib/libblasfeo.dylib
Binary file not shown.
Binary file added third_party/acados/Darwin/lib/libhpipm.dylib
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions third_party/acados/Darwin/lib/libqpOASES_e.dylib
Binary file added third_party/acados/Darwin/t_renderer
Binary file not shown.