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

Freebsd - wrong architecture #1880

Closed
mattkasun opened this issue Mar 10, 2022 · 2 comments · Fixed by #2064
Closed

Freebsd - wrong architecture #1880

mattkasun opened this issue Mar 10, 2022 · 2 comments · Fixed by #2064

Comments

@mattkasun
Copy link

I tried to package a go program for freebsd but keep getting wrong architecture:

~/t/fpm> fpm -s dir -t freebsd -a amd64 -n myapp --version 0.1.0 build/application=/bin/application
Created package {:path=>"myapp-0.1.0.txz"}

when trying to install

`[root@freebsd ~]# pkg add myapp-0.1.0.txz
Installing myapp-0.1.0...
pkg: wrong architecture: Linux:5:x86:64 instead of FreeBSD:12:amd64

Failed to install the following 1 package(s): myapp-0.1.0.txz
`

[root@freebsd ~]# tar -tf myapp-0.1.0.txz +COMPACT_MANIFEST +MANIFEST /bin/application

[root@freebsd ~]# cat +COMPACT_MANIFEST {"arch":"Linux:5:x86:64","name":"myapp","version":"0.1.0","comment":"no description given","desc":"no description given","origin":"fpm/myapp","maintainer":"<mkasun@endeavour>","www":"http://example.com/no-uri-given","prefix":"/"}
[root@freebsd ~]# cat +MANIFEST {"arch":"Linux:5:x86:64","name":"myapp","version":"0.1.0","comment":"no description given","desc":"no description given","origin":"fpm/myapp","maintainer":"<mkasun@endeavour>","www":"http://example.com/no-uri-given","prefix":"/","files":{"/bin/application":"8369bab99d55e31e780d5a3c32f3e89a0fd78456dd6224140507c788c1faf29c"},"scripts":{}} [root@freebsd ~]#

tried to build with different arch:

~/t/fpm> fpm -s dir -t freebsd -a FreeBSD:12:amd64 -n myapp --version 0.1.0 build/application=/bin/application Created package {:path=>"myapp-0.1.0.txz"}

same result.

Is there a different way to specify the freebsd arch?

target platform

[root@freebsd ~]# uname -a FreeBSD freebsd 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC amd64

build platform
mkasun@endeavour ~/t/fpm> uname -a
Linux endeavour 5.16.13-arch1-1 #1 SMP PREEMPT Tue, 08 Mar 2022 20:07:36 +0000 x86_64 GNU/Linux
mkasun@endeavour ~/t/fpm> fpm --version
1.14.1

@davidnewhall
Copy link
Contributor

Same issue here. #1832 has more reports of this issue. Tried fpm versions 0.15, 0.14, 0.13 on macOS and 0.15 on Linux. All versions create txz FreeBSD packages that FreeBSD does not like. When I build on macOS and install with pkg add <filename.txz>, I get:

pkg: wrong architecture: Darwin:22:x86:64 instead of FreeBSD:13:amd64

and when I build on Linux I get:

pkg: wrong architecture: Linux:5:x86:64 instead of FreeBSD:13:amd64

Using pkg add -f <filename.txz> works around the issue.

@davidnewhall
Copy link
Contributor

The linked pull request has been tested and resolves this issue.

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

Successfully merging a pull request may close this issue.

2 participants