PodToBUILD icon indicating copy to clipboard operation
PodToBUILD copied to clipboard

Cannot build `nanopb`

Open sgammon opened this issue 4 years ago • 2 comments

Hey esteemed PodToBUILD authors,

I get the following errors when attempting to build nanopb:

ERROR: /Volumes/.../Vendor/nanopb/BUILD.bazel:112:13: in non_arc_srcs attribute of objc_library rule //Vendor/nanopb:nanopb: source file '//Vendor/nanopb:pb_common.c' is misplaced here (expected .m or .mm)
ERROR: /Volumes/.../Vendor/nanopb/BUILD.bazel:112:13: in non_arc_srcs attribute of objc_library rule //Vendor/nanopb:nanopb: '//Vendor/nanopb:pb_common.c' does not produce any objc_library non_arc_srcs files (expected .m or .mm)
ERROR: /Volumes/.../Vendor/nanopb/BUILD.bazel:112:13: in non_arc_srcs attribute of objc_library rule //Vendor/nanopb:nanopb: source file '//Vendor/nanopb:pb_decode.c' is misplaced here (expected .m or .mm)
ERROR: /Volumes/.../Vendor/nanopb/BUILD.bazel:112:13: in non_arc_srcs attribute of objc_library rule //Vendor/nanopb:nanopb: '//Vendor/nanopb:pb_decode.c' does not produce any objc_library non_arc_srcs files (expected .m or .mm)
ERROR: /Volumes/.../Vendor/nanopb/BUILD.bazel:112:13: in non_arc_srcs attribute of objc_library rule //Vendor/nanopb:nanopb: source file '//Vendor/nanopb:pb_encode.c' is misplaced here (expected .m or .mm)
ERROR: /Volumes/.../Vendor/nanopb/BUILD.bazel:112:13: in non_arc_srcs attribute of objc_library rule //Vendor/nanopb:nanopb: '//Vendor/nanopb:pb_encode.c' does not produce any objc_library non_arc_srcs files (expected .m or .mm)

From the following declaration:

new_pod_repository(
  name = "nanopb",
  url = "https://github.com/nanopb/nanopb/archive/df0e92f474f9cca704fe2b31483f0b4d1b1715a4.zip",
  podspec_url = "https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/6/1/e/nanopb/1.30905.0/nanopb.podspec.json",
  inhibit_warnings = True,
)

sgammon avatar Jul 23 '20 04:07 sgammon

I'm seeing the same with Yoga. It seems that the c sources need to be built using a cc_library that the objc_library would depend on.

joprice avatar Jan 22 '21 22:01 joprice

Any workaround found?

spennihana avatar Apr 17 '21 17:04 spennihana