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

Apple M1 MAC failed to build /script/darwin/build.sh with Failure: no such file or directory #414

Closed
saurav2502 opened this issue Jan 25, 2024 · 6 comments

Comments

@saurav2502
Copy link

2 warnings generated.
[105/105] Linking CXX executable bin/dlt-viewer

  • cpack -G External
    CPack: Create package using External
    CPack: Install projects
    CPack: - Install project: dlt-viewer []
    CPack: Create package
    -- Install configuration: "Release"
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/Frameworks/libqdlt.dylib
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/lib/libqdlt.dylib
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/.
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdlt.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltcontrol.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdlttcpconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltfile.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltpluginmanager.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./export_rules.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltmsg.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltsegmentedmsg.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./dlt_user.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltserialconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./dlt_common_cfg.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltsettingsmanager.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltfilter.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./dlt_protocol.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./plugininterface.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltbase.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltfilterlist.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltmessagedecoder.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltplugin.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltargument.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltoptmanager.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltudpconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltdefaultfilter.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltipconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltfilterindex.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./dlt_types.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./dlt_common.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./sdk/include/qdlt/./qdltconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/.
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdlt.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltcontrol.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdlttcpconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltfile.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltpluginmanager.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./export_rules.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltmsg.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltsegmentedmsg.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./dlt_user.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltserialconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./dlt_common_cfg.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltsettingsmanager.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltfilter.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./dlt_protocol.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./plugininterface.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltbase.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltfilterlist.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltmessagedecoder.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltplugin.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltargument.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltoptmanager.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltudpconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltdefaultfilter.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltipconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltfilterindex.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./dlt_types.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./dlt_common.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./include/qdlt/./qdltconnection.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycommandplugin
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycommandplugin/CMakeLists.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycommandplugin/dummycommandplugin.cpp
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycommandplugin/dummycommandplugin.pro
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycommandplugin/dummycommandplugin.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/form.cpp
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/CMakeLists.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/form.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/dummycontrolplugin.cpp
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/form.ui
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/dummycontrolplugin.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummycontrolplugin/dummycontrolplugin.pro
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummydecoderplugin
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummydecoderplugin/CMakeLists.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummydecoderplugin/dummydecoderplugin.pro
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummydecoderplugin/dummydecoderplugin.cpp
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummydecoderplugin/dummydecoderplugin.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/form.cpp
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/CMakeLists.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/form.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/dummyviewerplugin.pro
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/form.ui
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/dummyviewerplugin.h
    -- Installing: /Users/saurav/dlt-viewer/build/install/./src/dummyviewerplugin/dummyviewerplugin.cpp
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/dlt-viewer
    -- Installing: /Users/saurav/dlt-viewer/build/install/./LICENSE.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./MPL.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./README.md
    -- Installing: /Users/saurav/dlt-viewer/build/install/./ReleaseNotes_Viewer.txt
    -- Installing: /Users/saurav/dlt-viewer/build/install/./doc/dlt_viewer_user_manual.pdf
    -- Installing: /Users/saurav/dlt-viewer/build/install/./doc/dlt_viewer_plugins_programming_guide.pdf
    -- Installing: /Users/saurav/dlt-viewer/build/install/./filters
    -- Installing: /Users/saurav/dlt-viewer/build/install/./filters/message_buffer_overflow.dlf
    -- Installing: /Users/saurav/dlt-viewer/build/install/./filters/software_version.dlf
    -- Installing: /Users/saurav/dlt-viewer/build/install/./filters/error_fatal_messages.dlf
    -- Installing: /Users/saurav/dlt-viewer/build/install/./filters/control_messages.dlf
    -- Installing: /Users/saurav/dlt-viewer/build/install/./plugins/examples
    -- Installing: /Users/saurav/dlt-viewer/build/install/./plugins/examples/filetransferplugin_configuration.xml
    -- Installing: /Users/saurav/dlt-viewer/build/install/./plugins/examples/dbusplugin_configuration.xml
    -- Installing: /Users/saurav/dlt-viewer/build/install/./plugins/examples/nonverboseplugin_configuration.xml
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/Resources/icon.icns
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/../Info.plist
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltdbusplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltlogstorageplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltsystemviewerplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdlttestrobotplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltviewerplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libfiletransferplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libnonverboseplugin.so
    -- Installing: /Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltsegmentationplugin.so
    -- Success.
    -- Call /opt/homebrew/share/qt/libexec/macdeployqt DLTViewer.app -executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltdbusplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltlogstorageplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltsegmentationplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltsystemviewerplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdlttestrobotplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libdltviewerplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libfiletransferplugin.so;-executable=/Users/saurav/dlt-viewer/build/install/DLTViewer.app/Contents/MacOS/plugins/libnonverboseplugin.so
    CMake Error at /Users/saurav/dlt-viewer/build/macdeployqt.cmake:42 (message):
    Failure: no such file or directory

CPack Error: Problem compressing the directory
CPack Error: Error when generating package: dlt-viewer

-----generated make file
cat /Users/saurav/dlt-viewer/build/macdeployqt.cmake
set(MACDEPLOYQT_EXECUTABLE "/opt/homebrew/share/qt/libexec/macdeployqt")
set(CMAKE_BINARY_DIR "/Users/saurav/dlt-viewer/build")
set(CMAKE_INSTALL_PREFIX "/Users/saurav/dlt-viewer/build/install")
set(DLT_APP_DIR_NAME "DLTViewer.app")
set(DLT_PLUGIN_INSTALLATION_PATH "DLTViewer.app/Contents/MacOS/plugins")

See CMAKE_INSTALL_PREFIX

execute_process(COMMAND ${CMAKE_COMMAND} "--install" "." "--prefix" "${CMAKE_INSTALL_PREFIX}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
RESULT_VARIABLE STATUS)

if(STATUS AND NOT STATUS EQUAL 0)
message(SEND_ERROR "Failure: ${STATUS}")
else()
message(STATUS "Success.")
endif()

execute_process(COMMAND ls -l

WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"

RESULT_VARIABLE STATUS)

execute_process(COMMAND tree

WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"

RESULT_VARIABLE STATUS)

file(GLOB DLT_PLUGINS_SO "${CMAKE_INSTALL_PREFIX}/${DLT_PLUGIN_INSTALLATION_PATH}/*.so")
list(TRANSFORM DLT_PLUGINS_SO PREPEND "-executable=")

message(STATUS "Call ${MACDEPLOYQT_EXECUTABLE} ${DLT_APP_DIR_NAME} ${DLT_PLUGINS_SO}")
execute_process(COMMAND
"${MACDEPLOYQT_EXECUTABLE}"
"${DLT_APP_DIR_NAME}"
-verbose=1
-always-overwrite
-dmg
-libpath=${CMAKE_INSTALL_PREFIX}/${DLT_APP_DIR_NAME}/Contents/Frameworks
${DLT_PLUGINS_SO}
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
RESULT_VARIABLE STATUS)

if(STATUS AND NOT STATUS EQUAL 0)
message(SEND_ERROR "Failure: ${STATUS}")
else()
message(STATUS "Success.")
endif()

@saurav2502 saurav2502 changed the title Apple M1 MAC Failure: no such file or directory Apple M1 MAC failed to build /script/darwin/build.sh with Failure: no such file or directory Jan 25, 2024
@hannesa2
Copy link
Collaborator

I made this work on my fork dlt-viewer#50
It's not on upstream (here) because I'll wait for the permission to add a custom M1 runner here. @alexmucde

@hannesa2
Copy link
Collaborator

@saurav2502
Copy link
Author

Thanks for quick information.

it was build successfully and it created binary
cd ~/dlt-viewer/build/bin
ls -al
drwxr-xr-x 5 saurav 603018132 160 Jan 25 22:37 .
drwxr-xr-x 26 saurav 603018132 832 Jan 25 22:45 ..
-rwxr-xr-x 1 saurav 603018132 1349496 Jan 25 22:37 dlt-viewer
-rwxr-xr-x 1 saurav 603018132 347888 Jan 25 22:37 libqdlt.dylib
drwxr-xr-x 10 saurav 603018132 320 Jan 25 22:37 plugins

When I am running using command ./dlt-viewer then dot-viewer is launching but it is very unstable, getting closed immediately.
[1] 28067 segmentation fault ./dlt-viewer
Screenshot 2024-01-25 at 11 48 35 PM
Screenshot 2024-01-25 at 11 48 35 PM

@saurav2502
Copy link
Author

Another binary present in
/dlt-viewer/build/dist

DLTViewer.app
DLTViewer.dmg
LICENSE.txt
MPL.txt
README.md
ReleaseNotes_Viewer.txt
doc
filters
include
plugins
sdk
src

how to launch DLTViewer.app?

I tried open -a DLTViewer.app > did not work.
double click on .dmg file > it just open below tab but does nothing.
Screenshot 2024-01-25 at 11 57 11 PM
Can you help me here that how this could be resolved the launching of the dot-viewer? It would be highly appreciated

@bunty95
Copy link
Contributor

bunty95 commented Jan 26, 2024

Btw, the magic was this https://github.com/dlt-viewer/dlt-viewer/pull/50/files#diff-1a6b54f881d5b938ae705efdae5a93ec8f3eac68ad15e44bf962afd94c2db707R10-R15

This doesn't seem to work for non M1 Mac devices. When trying on Intel Mac's CPACK still fails.

@bunty95
Copy link
Contributor

bunty95 commented Jun 13, 2024

Issue is fixed with latest push #482 and #487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
COVESA DLT Viewer
  
Awaiting triage
Development

No branches or pull requests

4 participants