You are not logged in.

#1 2014-06-12 19:15:43

ratcheer
Member
Registered: 2011-10-09
Posts: 924

[Solved] How to build a module that's not in repos or AUR?

I am trying to follow the ABS instructions to build a module. I have the source code from GitHub. However, I cannot find anything that says what to do if the module has not already been built somewhere in Arch. It is not in the abs tree and it is not in the AUR. Maybe I just don't understand the ABS instructions, but I seem to need a PKGBUILD to use it. All I have is the source code for the module.

On Debian, I just run make, then make install. For some reason, that fails in Arch:

gcc: error: -pg and -fomit-frame-pointer are incompatible

The recommendations I have found to work around that error say to keep -fomit-frame-pointer and remove -pg. However, -pg is not actually in the Makefile, it is apparently coming from some default location. If I can't find it, I can't remove it.

In case anyone knows another way to find Arch modules, the one I need is rtl8192du. It is for a USB wireless adapter dongle. https://github.com/lwfinger/rtl8192du

Tim

Last edited by ratcheer (2014-06-12 20:49:34)

Offline

#2 2014-06-12 19:27:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [Solved] How to build a module that's not in repos or AUR?

Do you have the headers package installed?  I was able to build this without any errors you show.

Offline

#3 2014-06-12 19:31:21

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

Yes, package linux-headers 3.14.6-1

Tim

Offline

#4 2014-06-12 19:35:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [Solved] How to build a module that's not in repos or AUR?

It also built fine here.  If it's not a lack of linux-headers, you may want to check your 'env' output.  Do you have any flags set that might be picked up by make?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-06-12 19:37:16

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

I don't think so. This is a fairly new Arch installation, and I only installed base-devel and linux-headers, yesterday.

Should I look for pg in the env output?

Tim

PS - I don't see anything that looks like any sort of flags or other compiler settings. No "pg" at all.

Last edited by ratcheer (2014-06-12 19:39:17)

Offline

#6 2014-06-12 19:51:40

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

Are you using the original (master) version, or the kernel version that Larry has made all his fixes to? I'm trying to use the kernel version: rtl8192du-kernel-version

I think that the master version is the one that Realtek open sourced a few years ago.

Tim

Last edited by ratcheer (2014-06-12 19:52:32)

Offline

#7 2014-06-12 19:53:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [Solved] How to build a module that's not in repos or AUR?

I built the version you linked to.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2014-06-12 19:54:44

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

Trilby wrote:

I built the version you linked to.

Both versions are on the same page, there is a drop down to select one or the other.

Tim

Offline

#9 2014-06-12 19:57:28

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

Ok, the Master version compiles for me, too. So, I guess there is some bug in his revisions.

So, back to the original question. Can I just make and make install this, or do I have to do some kind of ABS build for Arch?

Tim

Offline

#10 2014-06-12 20:00:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [Solved] How to build a module that's not in repos or AUR?

Merry Christmas - Please test it: https://aur.archlinux.org/packages/rtl8192du-git/

Offline

#11 2014-06-12 20:06:02

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

Thanks very much, graysky (and Trilby).

Tim

Offline

#12 2014-06-12 20:06:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [Solved] How to build a module that's not in repos or AUR?

I did just get the same error you posted in the OP when I switched to the "kernel-version" branch.  Do you need that branch, or will the master branch work?  If the master branch will work, graysky's aur package should do it.

(edit: this was crossposted with the above - I take it the master branch will work)

Last edited by Trilby (2014-06-12 20:06:51)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2014-06-12 20:09:46

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [Solved] How to build a module that's not in repos or AUR?

And they need to fix that Makefile... https://github.com/lwfinger/rtl8192du/pull/18

Offline

#14 2014-06-12 20:21:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [Solved] How to build a module that's not in repos or AUR?

ratcheer wrote:

So, back to the original question. Can I just make and make install this, or do I have to do some kind of ABS build for Arch?

You can build it outside of pacman but that is silly... pacman is Arch tongue  It is always best to make a PKGBUILD and build with makepkg/install with pacman.

Offline

#15 2014-06-12 20:49:13

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

Ok, I built the package from the AUR and installed it. The module is loaded. Now I just have to successfully get through all the systemd startup, wpa_supplicant, etc. The ip link is there and it got an IP address, but something along the way is failing. I just need to go back through all that and try to find what is wrong. I am pretty sure the module is doing just fine.

Thread is marked Solved.

Thanks again,
Tim

Last edited by ratcheer (2014-06-12 20:53:12)

Offline

#16 2014-06-12 23:34:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] How to build a module that's not in repos or AUR?

grr, while it's great you make the PKGBUILD, graysky, couldn't you have given it a working pkgver function?

Offline

#17 2014-06-12 23:42:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [Solved] How to build a module that's not in repos or AUR?

Scimmia wrote:

grr, while it's great you make the PKGBUILD, graysky, couldn't you have given it a working pkgver function?

It does... It is a git package with a valid pkgver for a git package, no?

Offline

#18 2014-06-12 23:49:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [Solved] How to build a module that's not in repos or AUR?

The results of `git describe` will not be sequential (nor monotonically increasing which is really the requirement).  The wiki suggests using tags, if they are present.  But as I rarely use tags myself, I usually use something like the following:

$(git rev-list --count HEAD).$(git describe --always)

This does provide the "describe" hash, but before that is a monotonically increasing number so new commits always show as upgrades.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#19 2014-06-13 00:03:15

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [Solved] How to build a module that's not in repos or AUR?

I should open a new thread, but I have been working hard trying to get that new interface actually connected, and I have not been able to. Both the network-wireless@wlp0s26u1u3 and the wpa_supplicant@wlp0s26u1u3 services fail, no matter how hard I try to make sure they are set up correctly.

Quick question - is it ok to have two wireless interfaces running, simultaneously?

Tim

Offline

#20 2014-06-13 00:40:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [Solved] How to build a module that's not in repos or AUR?

Trilby wrote:

The results of `git describe` will not be sequential (nor monotonically increasing which is really the requirement).  The wiki suggests using tags, if they are present.  But as I rarely use tags myself, I usually use something like the following:

$(git rev-list --count HEAD).$(git describe --always)

This does provide the "describe" hash, but before that is a monotonically increasing number so new commits always show as upgrades.

That fails for me:

==> Validating source files with md5sums...
    rtl8192du ... Skipped
==> Extracting sources...
  -> Creating working copy of rtl8192du git repo...
Cloning into 'rtl8192du'...
done.
==> Starting pkgver()...
/scratch/rtl8192du-git/PKGBUILD: line 20: 251.e627694: command not found

Offline

#21 2014-06-13 02:07:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [Solved] How to build a module that's not in repos or AUR?

That would just be the value - it needs to be echoed or used in some way:

echo "$(git rev-list --count HEAD).$(git describe --always )"

Last edited by Trilby (2014-06-13 02:10:32)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#22 2014-06-13 02:48:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] How to build a module that's not in repos or AUR?

Yeah, sorry, you just kind of hit one of my pet peeves there. git describe really only works for repos with tags.

Personally, I recommend something like

printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

printf is a built-in, so it's better to use than echo IMO. Putting an "r" in front lets you switch to a pkgver from a tag later without it being a downgrade. And lastly, using git rev-parse --short will always give you the short hash, even if tag is added later.

Offline

Board footer

Powered by FluxBB