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

Build error on macOS: ar: Argument list too long (there is a fix, but a better one wanted) #19

Open
barracuda156 opened this issue Jan 4, 2023 · 3 comments

Comments

@barracuda156
Copy link

On macOS there is an issue with length of ar arguments: I get an error ar: Argument list too long.
I made a fix, but it is quite ugly :)

I had to split the target here: https://github.com/macports/macports-ports/blob/1c8cb98aa54e71148f4a5c416a6c82adb20f5a00/math/AlphaSparse/files/0010-Makefile.tail-split-lib-target-to-fix-ar-error.patch
And also re-shuffle files from plain/kernel: https://github.com/macports/macports-ports/blob/1c8cb98aa54e71148f4a5c416a6c82adb20f5a00/math/AlphaSparse/Portfile#L42

Can it be fixed in a neater way?

@barracuda156
Copy link
Author

Turned out that the failure occurs even on x86_64 and recent macOS like Catalina: https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/130695/steps/install-port/logs/stdio

@ryandesign
Copy link

I guess the problem is that ar is being given the absolute paths of each object file, and the path to the directory that MacPorts builds happen in is rather long to begin with. Could the Makefile call ar with relative paths to the objects, perhaps even just the filenames?

@barracuda156
Copy link
Author

@NCIC-AlphaSparse Any chance of addressing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants