Skip to content

Making an empty .cmxa fails on MacOS #6550

@vicuna

Description

@vicuna

Original bug ID: 6550
Reporter: @damiendoligez
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2017-03-10T12:45:39Z)
Resolution: duplicate
Priority: low
Severity: minor
OS: Mac OS X
Category: compiler driver
Monitored by: @gasche

Bug description

The command

ocamlopt -a -o foo.cmxa

works on Linux, but gives an error message from "ar" on MacOSX because Darwin's "ar" command does not allow adding zero files to an archive (stupid MacOSX).

Additional information

One way to create an empty archive is:

ar rc foo.a /dev/null
ar d foo.a null

but it really hurts my sensibility to have to hack around such a problem. Does anybody have a more elegant solution?

I think I'll report this to Apple as an "ar" bug.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions