DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Package System (pkgsrc)

NetBSD Package System (pkgsrc) Installation and upgrading of packages on NetBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th January 2017
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Question installing and using pkgsrc/pkgin on linux, crosscompiling for a netbsd target

Hello.

I'll install netbsd on an old computer, but I am sure I'll have a hard time to get wireless internet working in a way or another. I figured I could do that easily if I managed to install things for this computer, on another one, the one I am using now, by crosscompiling. And that it would be a good training, isn't it ?
For now, if pkg_add and so on are recognized, I still can't "pkg_add pkgin" or any software: it says it doesn't know that package. How come ? I see it, it's there.

Thanks.
Here's my $PATH variable: $PATH=/usr/pkg/sbin:/usr/pkg/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

ps:some might remember me. Indeed, I failed using this system many time, but I am a romantic, and I can't stop feeling something in my heart anytime I read "pkgsrc" or "netbsd", I just don't know why... so here I am again
Reply With Quote
  #2   (View Single Post)  
Old 11th January 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

In regards to installing pkgin, the variable you need to set is PKG_PATH. It is the URL/path to the binary NetBSD package repository you wish to use. Globally, there are at least 8 http/ftp servers. There are some guidlines on setting up pkgin on NetBSD that come up readily on an Internet Search. Use search terms: NetBSD pkgin. pkgin configuration is specified in /usr/pkg/etc/pkgin which should set a default that is linked to the current -stable branch.


I currently have 2 old PC's running NetBSD 7.0.2 patch with WPA2 encrypted pci wireless cards. It is dependent on your hardware - some wireless chips work better than others.

I use the NetBSD wiki guidelines to set up although I have to manually run dhclient the first time.

Last edited by shep; 11th January 2017 at 10:31 PM.
Reply With Quote
  #3   (View Single Post)  
Old 11th January 2017
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

Code:
echo $PKG_PATH
http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/All
root@debian:/home/pc2# pkg_add pkgin
pkg_add: no pkg found for 'pkgin', sorry.
pkg_add: 1 package addition failed
I've followed the advises of http://www.unixmen.com/howto-install-pkgin-on-netbsd-6/
As for the wireless of course I know it is possible and I know too that the problem are drivers. Idem for X, which is the very reason I stopped using NBSD last time. But it was a fun time, I hope it will now too.
edit: Knowing both english and french, I happen to forget when I use one or the other ! sorry !

Last edited by spermwhale_warrior; 11th January 2017 at 08:56 PM.
Reply With Quote
  #4   (View Single Post)  
Old 11th January 2017
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

sperwhale_warrior, per the forum rules, English only please.
Reply With Quote
  #5   (View Single Post)  
Old 11th January 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Your $PKG_PATH is incorrect.
It should be
If you click on the two links above, you will see that your link is a deadend. Clicking on the second link shows a list of packages one of which is pkgin.
Packages are specific to the NetBSD Release and the pkgsrc version. Every quarter a new version of pkgsrc is released. These are the currently available pkgsrc versions for the amd64 architecture. I copied them from http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/.
Quote:
Parent Directory 09-Mar-2016 18:47 1kB
6.0/ 09-Jan-2017 06:22 1kB
6.0.1/ 09-Jan-2017 06:22 1kB
6.0.2/ 09-Jan-2017 06:22 1kB
6.0.3/ 09-Jan-2017 06:22 1kB
6.0.4/ 09-Jan-2017 06:22 1kB
6.0.5/ 09-Jan-2017 06:22 1kB
6.0_2016Q1/ 13-May-2016 21:51 1kB
6.0_2016Q2/ 25-Sep-2016 18:30 1kB
6.0_2016Q3/ 30-Dec-2016 00:54 1kB
6.0_2016Q4/ 09-Jan-2017 06:22 1kB
6.1/ 09-Jan-2017 12:27 1kB
6.1.1/ 09-Jan-2017 12:27 1kB
6.1.2/ 09-Jan-2017 12:27 1kB
6.1.3/ 09-Jan-2017 12:27 1kB
6.1.4/ 09-Jan-2017 12:27 1kB
6.1.5/ 09-Jan-2017 12:27 1kB
6.1_2016Q2/ 25-Sep-2016 12:38 1kB
6.1_2016Q3/ 30-Dec-2016 01:42 1kB
6.1_2016Q4/ 09-Jan-2017 12:27 1kB
7.0/ 11-Jan-2017 12:32 1kB
7.0.1/ 11-Jan-2017 12:32 1kB
7.0.2/ 11-Jan-2017 12:32 1kB
7.0_2016Q1/ 06-May-2016 18:50 1kB
7.0_2016Q2/ 25-Sep-2016 18:44 1kB
7.0_2016Q3/ 30-Nov-2016 12:57 1kB
7.0_2016Q4/ 11-Jan-2017 12:32 1kB
7.0_current/ 17-Oct-2016 16:07 0kB
README 17-Jan-2016 05:18 0kB
pkgsrc2016Q4 was just released and many packages do not presently build. I would recommend retrieving pkgin from the 7.0_2016Q3 repository. When pkgsrc_2016Q4 is deemed ready, the developers will change the links so that you can easily update. Presently 7.0 -> 7.0_2016Q3. When Q4 is ready the link will be 7.0 -> 7.0_2016Q4.

Last edited by shep; 11th January 2017 at 10:42 PM. Reason: usual fat finger typos and right brained grammer errors
Reply With Quote
  #6   (View Single Post)  
Old 11th January 2017
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

Oh, sorry, sometimes the addresses in config files are without the ending "/", sometimes with. I got confused. I'll change the pkgsrc tree later, as I doubt I'll find an absent build with the few packages I'll need. So, why do
Code:
root# echo $PKG_PATH
http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.0/All/
root# pkg_add pkgin
pkg_add: no pkg found for 'pkgin', sorry.
pkg_add: 1 package addition failed
So there must be something else than $PKG_PATH ? Otherwise, I can still go in the package directory, then run 'bmake install clean clean-depends'. But still no pkg_add anything. I built pkglint, but pkgin gave that:
Code:
===> Building for pkgin-0.9.4nb4
cc -L/home/pc2/pkgsrc/pkgtools/pkgin/work/libnbcompat -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/home/pc2/pkgsrc/pkgtools/pkgin/work/libnbcompat -L/usr/pkg/lib -Wl,-R/usr/pkg/lib    -o pkgin main.o summary.o tools.o pkgindb.o depends.o actions.o pkglist.o download.o order.o impact.o autoremove.o fsops.o pkgindb_queries.o pkg_str.o sqlite_callbacks.o selection.o pkg_check.o pkg_infos.o preferred.o automatic.o dewey.o fexec.o global.o opattern.o pkgdb.o var.o progressmeter.o humanize_number.o  -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib	 -lbz2 -lz -larchive -lfetch -lpthread -lnbcompat -lcrypto -lssl -lnbcompat -lsqlite3
/usr/bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
*** Error code 1
Is it because my tree version is too recent ? I do have the library libbzip2.

Last edited by spermwhale_warrior; 11th January 2017 at 11:34 PM.
Reply With Quote
  #7   (View Single Post)  
Old 12th January 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

If your network connection is not established, pkgin will not be found. Can you ping www.google.com or www.netbsd.org?
Reply With Quote
  #8   (View Single Post)  
Old 12th January 2017
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

Of course.
Code:
root@debian:/home/pc2/pkgsrc/pkgtools/pkgin# ping google.fr
PING google.fr (216.58.211.195) 56(84) bytes of data.
64 bytes from mad01s25-in-f3.1e100.net (216.58.211.195): icmp_seq=1 ttl=54 time=46.8 ms
Is there a means to run bmake in verbose mode ?
Reply With Quote
  #9   (View Single Post)  
Old 12th January 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

bmake is used when building packages on a NON NetBSD system. When building on a NetBSD system make(1) is used. See Using pkgsrc on non-netbsd systems.

The other thing that can cause you trouble is to mix repository binaries that were built with one version of pkgsrc with a different version of pkgsrc.

If you your goal is to get your first working NetBSD Desktop I would make several recommendations:

1) Use precompiled binaries (packages). Packages built with pkgsrc_2016Q3 have just finished several months of fixing build failures - it is as good as it's going to get.

2) Use amd64/i386.

3) I use NetBSD 7 but most builds are initiated with NetBSD 6.1 The 7.1 release candidate will have some teething problems and I would avoid it until you are comfortable with setting up a system from stable sources. Using a release candidate adds the extra variable of code in testing - did it fail because of something you did or is it just buggy?
Reply With Quote
Old 12th January 2017
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

Because one of my goal is to learn to use pkgsrc anywhere and get used to crosscompiling, I'll download an older and more stable tree version. Otherwise, I knew that bmake is for non-netbsd system. I doubt that pkg_add non working at all, is because of the "testing part" of the packages, it is too big a bug. I mean, if it is, I don't imagine how is the 'current' branch.
That tree would be mostly devoid of bugs http://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.bz2 is that right ?

Last edited by spermwhale_warrior; 12th January 2017 at 08:14 PM.
Reply With Quote
Old 12th January 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
That tree would be mostly devoid of bugs...is that right ?
Patching and bug fixes continue after a release. If you look at the time and date stamps for pkgsrc_2016Q3, you will see entries that occurred several months after the release of 2016Q3.

A useful mailing list to follow is Pkgsrc bulk build reports. You can scroll back through the archives to get a sense of what is "stable".

If you goal is to install a working Xfce4 desktop, at this time your highest likelyhood of success is with 2016Q3. If you want to help the NetBSD pkgsrc community debug their build scripts, attention is now focused on 2016Q4.
Reply With Quote
Old 28th January 2017
philo_neo71 philo_neo71 is offline
Spam Deminer
 
Join Date: Jul 2009
Posts: 278
Default

He said you is an repository program packet
i hope for you to find a idéas for anderstand it
Reply With Quote
Reply

Tags
crosscompiling, newbie, pkgsrc

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pkgin pkgsrc pkg_add errors gpatrick NetBSD Package System (pkgsrc) 8 11th November 2015 10:42 PM
pkgsrc/pkgin path tolstoi NetBSD Package System (pkgsrc) 4 25th April 2015 01:26 PM
Dragonflybsd: installing pkgsrc sgt_learn Other BSD and UNIX/UNIX-like 4 1st June 2013 02:56 PM
pkgsrc (and NetBSD) rocks! diablo NetBSD Package System (pkgsrc) 0 12th April 2013 06:36 PM
NetBSD 4.0 upgrade and pkgsrc fenrisW0lf NetBSD Installation and Upgrading 3 19th June 2008 09:39 PM


All times are GMT. The time now is 05:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick