how to find out current architecture?

Asked by Sampsa Riikonen on 2020-09-25

I'm sending my source package to Ubuntu's server farms with dput.

However, during the the build process, my Makefile needs to know the architecture (x86_64, armf, etc.).

In which environmental variable this is available? I doubt that uname -m will work.

An extra question: I've heard a rumor that one can log into one of those servers in the farm and play around with the environment. Any link to documentation explainig this would be appreciated.

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Last query:
Last reply:
Colin Watson (cjwatson) said : #1

Add "include /usr/share/dpkg/" to your debian/rules, and then you can use $(DEB_HOST_ARCH) in your Makefile. (See "man dpkg-architecture" for other similar variables.)

The rumour you heard was wrong; we do not offer such a facility. However, there's nothing to stop you uploading source packages to a PPA that report various bits of information in their build log: for example, the "procenv" package in Ubuntu exists pretty much in order to do that.

Thanks. Any place where those architecture symbols are listed. DEB_HOST_ARCH for example in my machine seems to be "amd64" (instead of "x86_64"). What it might be for arm? Maybe arm64 ?

Can you help with this problem?

Provide an answer of your own, or ask Sampsa Riikonen for more information if necessary.

To post a message you must log in.