Skip to content

Freebsd - wrong architecture #1880

@mattkasun

Description

@mattkasun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions