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

macOS 10.14 build error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output) #125

Closed
softmurata opened this issue Apr 12, 2021 · 1 comment
Labels
host:macos Issue that occurs when host OS is macOS type:build/install Cannot build/install the plugin

Comments

@softmurata
Copy link

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 20.04, WSL2): MacOS Mojave(10.14)
  • Target (e.g. desktop cpu, android arm64): desktop cpu
  • Bazel version: 4.0.0
  • Python version: 3.9.2
  • GCC/G++ version: Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  • Unity version:
  • Android NDK version (if building for Android):
  • Xcode version (if building for iOS):

Describe the problem
At first, I cloned the repository and installed dependencies by brew.
Second, I ran build.py with this command line

python build.py build --desktop cpu -v

but occured following errors.

INFO (build.py): Building protobuf sources...
DEBUG (build.py): Running `bazel build -c opt //mediapipe_api:mediapipe_proto_srcs`
DEBUG: /private/var/tmp/_bazel_tatsuro/b4321208f60e104f617ccbdceeffecf0/external/rules_foreign_cc/workspace_definitions.bzl:6:6: `@rules_foreign_cc//:workspace_definitions.bzl` has been replaced by `@rules_foreign_cc//foreign_cc:repositories.bzl`. Please use the updated source location
INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_tatsuro/b4321208f60e104f617ccbdceeffecf0/external/zlib/BUILD.bazel:5:11: Linking external/zlib/libzlib.a [for host] failed: (Exit 1): libtool failed: error executing command /usr/bin/libtool @bazel-out/host/bin/external/zlib/libzlib.a-2.params

Use --sandbox_debug to see verbose messages from the sandbox libtool failed: error executing command /usr/bin/libtool @bazel-out/host/bin/external/zlib/libzlib.a-2.params

Use --sandbox_debug to see verbose messages from the sandbox
error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
Target //mediapipe_api:mediapipe_proto_srcs failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.275s, Critical Path: 0.14s
INFO: 11 processes: 11 internal.
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
  File "/Users/tatsuro/Documents/Media2CloudTutorial/mediapipe/MediaPipeUnityPlugin/build.py", line 362, in <module>
    Argument().command().run()
  File "/Users/tatsuro/Documents/Media2CloudTutorial/mediapipe/MediaPipeUnityPlugin/build.py", line 102, in run
    self._run_command(self._build_proto_srcs_commands())
  File "/Users/tatsuro/Documents/Media2CloudTutorial/mediapipe/MediaPipeUnityPlugin/build.py", line 47, in _run_command
    return subprocess.run(command_list, check=True)
  File "/Users/tatsuro/opt/anaconda3/envs/mediapipe_unity/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', 'build', '-c', 'opt', '//mediapipe_api:mediapipe_proto_srcs']' returned non-zero exit status 1.

I cannot solve this error.
Please tell me how to solve it.

Steps to reproduce the issue

python build.py build --desktop cpu -v

Full logs

INFO (build.py): Building protobuf sources...
DEBUG (build.py): Running `bazel build -c opt //mediapipe_api:mediapipe_proto_srcs`
DEBUG: /private/var/tmp/_bazel_tatsuro/b4321208f60e104f617ccbdceeffecf0/external/rules_foreign_cc/workspace_definitions.bzl:6:6: `@rules_foreign_cc//:workspace_definitions.bzl` has been replaced by `@rules_foreign_cc//foreign_cc:repositories.bzl`. Please use the updated source location
INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_tatsuro/b4321208f60e104f617ccbdceeffecf0/external/zlib/BUILD.bazel:5:11: Linking external/zlib/libzlib.a [for host] failed: (Exit 1): libtool failed: error executing command /usr/bin/libtool @bazel-out/host/bin/external/zlib/libzlib.a-2.params

Use --sandbox_debug to see verbose messages from the sandbox libtool failed: error executing command /usr/bin/libtool @bazel-out/host/bin/external/zlib/libzlib.a-2.params

Use --sandbox_debug to see verbose messages from the sandbox
error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
Target //mediapipe_api:mediapipe_proto_srcs failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.275s, Critical Path: 0.14s
INFO: 11 processes: 11 internal.
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
  File "/Users/tatsuro/Documents/Media2CloudTutorial/mediapipe/MediaPipeUnityPlugin/build.py", line 362, in <module>
    Argument().command().run()
  File "/Users/tatsuro/Documents/Media2CloudTutorial/mediapipe/MediaPipeUnityPlugin/build.py", line 102, in run
    self._run_command(self._build_proto_srcs_commands())
  File "/Users/tatsuro/Documents/Media2CloudTutorial/mediapipe/MediaPipeUnityPlugin/build.py", line 47, in _run_command
    return subprocess.run(command_list, check=True)
  File "/Users/tatsuro/opt/anaconda3/envs/mediapipe_unity/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', 'build', '-c', 'opt', '//mediapipe_api:mediapipe_proto_srcs']' returned non-zero exit status 1.

Additional context
Add any other context about the problem here.

@homuler
Copy link
Owner

homuler commented Apr 12, 2021

Will you try bazel 3.7.2?
cf. bazelbuild/bazel#12894

@homuler homuler closed this as completed May 28, 2021
@homuler homuler changed the title MacOS 10.14 build error macOS 10.14 build error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output) Jan 10, 2022
@homuler homuler added host:macos Issue that occurs when host OS is macOS type:build/install Cannot build/install the plugin labels Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host:macos Issue that occurs when host OS is macOS type:build/install Cannot build/install the plugin
Projects
None yet
Development

No branches or pull requests

2 participants