# Why is the port FSV (File system Visualizer) broken on FreeBSD?



## antoniog120 (Dec 22, 2016)

Was just curious as to why the port FSV is broken and no longer being maintained? Was it because of lack of interest? This is a cool port. The funny thing is that I run OpenBSD on my Desktop using the X Window System and that port/package is available for OpenBSD. This is the first port/package that I see available on OpenBSD but not FreebSD usually FreeBSD has more ports/packages available than OpenBSD. How I came to find this port is I was curious if the file system navigator from the IRIX operating system which was in the movie Jurassic park was available for the BSD operating systems and I found  the clone of it called FSV (FIle system visualizer) for OpenBSD.I run a FreeBSD 10.3-RELEASE AMD64 server and when I run the make search name=fsv command this is the output I receive:

```
root@eagle:/usr/ports # make search name=fsv
Port:   x11-fm/FSViewer
Moved:
Date:   2012-08-05
Reason: Broken, unmaintained, dead upstream

Port:   x11-fm/fsv
Moved:
Date:   2013-02-14
Reason: Depends on expired x11-toolkits/gtkglarea

root@eagle:/usr/ports #
```


----------



## SirDice (Dec 22, 2016)

The first one has a dead upstream. Meaning the sources themselves disappeared. The other is depending on a port that doesn't exist anymore.

Remember, ports are a community effort. If nobody fixes what's broken it'll be removed after some time.


----------



## antoniog120 (Dec 22, 2016)

SirDice,

I see the maintainer didn't fix what was broken so it was removed. That's a shame as this is a cool port. You don't see 3D file system navigation in many operating systems.


----------



## SirDice (Dec 22, 2016)

You can try and fix it yourself if you're up for it. Then submit the patches so the port can be resurrected.


----------



## antoniog120 (Dec 22, 2016)

What are the steps to resurrect a port? I've only installed and used ports but have never resurrected a port. If you can provide me with some information I could give it an attempt.


----------



## vejnovic (Dec 22, 2016)

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html


----------



## antoniog120 (Dec 22, 2016)

Ok checked out that URL provided for the porters handbook. It's a detailed read. But from what I'm reading there I'm not creating a new port as the port existed at one point it's just broken presently so from what I gather from this handbook I am just upgrading an existing port which it then says to jump to chapter 10 for that. Is my understanding correct?


----------



## tobik@ (Dec 23, 2016)

I wouldn't worry too much about the old port. Just update it and submit as a new port. When submitting the port be sure to mention that there was a previous port named x11-fm/fsv though, so that the committer can delete the MOVED entry for it etc.


----------



## antoniog120 (Dec 23, 2016)

Ok I see. Thanks for the information.


----------



## antoniog120 (Dec 28, 2016)

Well now that the holidays are settled down for a little bit. I've had time to look more into this porting process. I was reading chapter 3 Quick Porting URL https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html. As I read more into it looks like I need to have FreeBSD installed on my desktop to create the port? I currently only have FreeBSD 10.3-RELEASE amd64 installed on a production server running web servers, dns servers, etc so I don't feel comfortable running this process I've never done before on there. I currently use OpenBSD 6.0 on my desktop. So my question is do I need to install FreeBSD on my desktop to do this procedure?


----------



## tobik@ (Dec 29, 2016)

antoniog120 said:


> So my question is do I need to install FreeBSD on my desktop to do this procedure?


Yes, that's the only way to build/test/run your port.


----------



## SirDice (Dec 29, 2016)

Isn't there some virtualization software you could use on OpenBSD to run FreeBSD? I'm not too familiar with the available packages/ports for OpenBSD. A console only VM would be more than sufficient.


----------



## antoniog120 (Dec 29, 2016)

Ok I will figure out a way to install FreeBSD on my desktop. Yeah I've heard of virtualization software called qemu for OpenBSD but have never used it.


----------



## antoniog120 (Dec 29, 2016)

I attempted to run FreeBSD-10.3-RELEASE-amd64-dvd1.iso iso file within OpenBSD 6.0's qemu PC system emulator program but FreBSD paniced on multi-user startup during installation. The interesting thing is that OpenBSD's iso file cd60.iso booted up fine inside OpenBSD's qemu program. But I have no purpose to run OpenBSD within OpenBSD . I have no idea what's going on there and I don't know enough about qemu to troubleshoot further so I'm just going to install FreeBSD on real hardware as that has worked for me before.


----------



## antoniog120 (Dec 30, 2016)

Ok so now I have FreeBSD 10.3-RELEASE amd64 installed and working on my desktop. I'm reading chapter 3 quick porting of the handbook provided and it states there to verify that the software complies from source before hand on FreeBSD so I went to the FSV website http://fsv.sourceforge.net/ and downloaded the source tar file and extracted it. However after reading their website and looking at the text files included with the tar file I can find no instructions on how to compile this program. I don't know if I am missing something but do you guys see any instructions on how to compile on the FSV website or tar file because I didn't find any.


----------



## Phishfry (Dec 30, 2016)

If you follow the links you end up with a single download here:
https://sourceforge.net/projects/fsv/files/
Uncompress it and there is a /src directory.
The files are so old you have little chance of this working out of the box.
You would be best advise to look hard at the last working version of this.
The files are from 2000 and this looks long gone.

If you persist i would start with `cc -o fsv fsv.c`


----------



## Phishfry (Dec 30, 2016)

I would imagine you would have to install the Linux compiling tools for building this. I don't know which though..

Personally I would jump forward and look at the last know good version from ports. See where it breaks. Fixup from there.


----------



## Phishfry (Dec 30, 2016)

My approach would be this: look at when it dropped off the ports tree and I would use a version of FreeBSD that corresponds.

For Example FreeBSD 9.0 probably has this in its ports collection as it was released before this dropped off.

Build it on the last version that works and then migrate up through the versions fixing what needs fixing until you hit -Current.
(assuming it don't work with todays releases)

It might not need much work. Problem might be finding the old FreeBSD fixed up source tar file.
The ports tree is only a skeleton and links to the file.

From the old port you will be able to find the name of the needed tar file then google for it or contact last maintainer and hope.
To maintain this port you would need to arrange a host for your resurrected tarball.


----------



## aragats (Dec 30, 2016)

I would suggest using this repo instead:
https://github.com/mcuelenaere/fsv
It's a fork, and people really work on it in contrast with the original unmaintained code. They have instructions too.


----------



## antoniog120 (Dec 31, 2016)

aragats said:


> I would suggest using this repo instead:
> https://github.com/mcuelenaere/fsv
> It's a fork, and people really work on it in contrast with the original unmaintained code. They have instructions too.


I checked out that repo you suggested and you are correct that they do provide instructions and provide the sources as a zip file but they provide instructions for Ubuntu Linux but I'm trying to compile this on FreeBSD not Linux. It states to install dependencies using Linux package commands. I looked for those ports and packages using pkg and make search name= on FreeBSD and it could not locate them. I ran the configure script per those instructions and it told me it was missing an OpenGL utility library. When I look for FreeBSD OpenGL ports I find many which is the one I need to install?


```
$ ./configure
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for asprintf... yes
checking for fwprintf... yes
checking for newlocale... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for snprintf... yes
checking for strnlen... yes
checking for wcslen... yes
checking for wcsnlen... yes
checking for mbrtowc... yes
checking for wcrtomb... yes
checking whether _snprintf is declared... no
checking whether _snwprintf is declared... no
checking whether getc_unlocked is declared... yes
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... no
checking whether to use NLS... yes
checking where the gettext function comes from... included intl directory
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for GLIB... yes
checking for glBegin in -lMesaGL... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
checking for glBegin in -lGL... yes
configure: error: Missing OpenGL utility library

checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for asprintf... yes
checking for fwprintf... yes
checking for newlocale... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for snprintf... yes
checking for strnlen... yes
checking for wcslen... yes
checking for wcsnlen... yes
checking for mbrtowc... yes
checking for wcrtomb... yes
checking whether _snprintf is declared... no
checking whether _snwprintf is declared... no
checking whether getc_unlocked is declared... yes
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... no
checking whether to use NLS... yes
checking where the gettext function comes from... included intl directory
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for GLIB... yes
checking for glBegin in -lMesaGL... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
checking for glBegin in -lGL... yes
[B]configure: error: Missing OpenGL utility library[/B]
```


----------



## antoniog120 (Dec 31, 2016)

Phishfry said:


> If you follow the links you end up with a single download here:
> https://sourceforge.net/projects/fsv/files/
> Uncompress it and there is a /src directory.
> The files are so old you have little chance of this working out of the box.
> ...



I tried that compiler command you stated and it generated the following error:

```
root@gordo:/home/antonio/Downloads/fsv-0.9/src # cc -o fsv fsv.c
In file included from fsv.c:26:
./common.h:36:10: fatal error: 'config.h' file not found
#include "config.h"
         ^
1 error generated.
root@gordo:/home/antonio/Downloads/fsv-0.9/src #
```


----------



## antoniog120 (Dec 31, 2016)

Phishfry said:


> My approach would be this: look at when it dropped off the ports tree and I would use a version of FreeBSD that corresponds.
> 
> For Example FreeBSD 9.0 probably has this in its ports collection as it was released before this dropped off.
> 
> ...




It looks like the fsv port expired in 2013 according to the make search name=fsv output on my freebsd 10.3 desktop.

```
root@gordo:/usr/ports # make search name=fsv
Port:    x11-fm/FSViewer
Moved:   
Date:    2012-08-05
Reason:    Broken, unmaintained, dead upstream

Port:    x11-fm/fsv
Moved:    
Date:    2013-02-14
Reason:    Depends on expired x11-toolkits/gtkglarea

root@gordo:/usr/ports #
```


Isn't FreeBSD 9.0 end of life in one day? Will I still have access to to the ports on Sunday January 1st? I won't have time today to install FreeBSD 9.3 today but I could do it on sunday.


----------



## tobik@ (Dec 31, 2016)

antoniog120 said:


> When I look for FreeBSD OpenGL ports I find many which is the one I need to install?


graphics/libGLU



aragats said:


> I would suggest using this repo instead:
> https://github.com/mcuelenaere/fsv
> It's a fork, and people really work on it in contrast with the original unmaintained code. They have instructions too.


The OpenBSD port uses http://fedorchenko.net/fsv2.php. Both forks seem different. http://fedorchenko.net/fsv2.php uses Gtk2mm and the one on GitHub only Gtk2.


----------



## antoniog120 (Dec 31, 2016)

tobik said:


> graphics/libGLU
> 
> 
> The OpenBSD port uses http://fedorchenko.net/fsv2.php. Both forks seem different. http://fedorchenko.net/fsv2.php uses Gtk2mm and the one on GitHub only Gtk2.



I installed the libGLU port but still receive the same error when running the configure script using the github sources.


```
checking features.h usability... no
checking features.h presence... no
checking for features.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for asprintf... yes
checking for fwprintf... yes
checking for newlocale... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for snprintf... yes
checking for strnlen... yes
checking for wcslen... yes
checking for wcsnlen... yes
checking for mbrtowc... yes
checking for wcrtomb... yes
checking whether _snprintf is declared... no
checking whether _snwprintf is declared... no
checking whether getc_unlocked is declared... yes
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... no
checking whether to use NLS... yes
checking where the gettext function comes from... included intl directory
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for GLIB... yes
checking for glBegin in -lMesaGL... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
checking for glBegin in -lGL... yes
configure: error: Missing OpenGL utility library
$
```


----------



## antoniog120 (Dec 31, 2016)

tobik said:


> graphics/libGLU
> 
> 
> The OpenBSD port uses http://fedorchenko.net/fsv2.php. Both forks seem different. http://fedorchenko.net/fsv2.php uses Gtk2mm and the one on GitHub only Gtk2.



Yeah I had no problem installing the FSV package on OpenBSD 6.0 AMD64 and it ran flawlessly on the X Window System.


----------



## antoniog120 (Dec 31, 2016)

Ok great news gentlemen I was able to compile File System Visualizer and install it on FreeBSD 10.3-RELEASE AMD64 using the OpenBSD sources that are used by the OpenBSD 6.0 package at http://fedorchenko.net/fsv2.php. I ran it successfully on the FreeBSD X Window System and was able to browse my home directory using it. It makes sense that this version worked as they are both BSD operating systems. The trick was making sure each package that it required was installed when running the `./configure` script. I had no luck using the GitHub sources as those were designed for Linux. It's been a long evening and I will look into the rest of the chapter 3 quick porting process on Sunday.


```
Dec 30 20:57:52 gordo pkg: gtkmm24-2.24.4_2 installed
Dec 30 21:03:45 gordo pkg: pangox-compat-0.0.2_1 installed
Dec 30 21:03:45 gordo pkg: gtkglext-1.2.0_18 installed
Dec 30 21:06:31 gordo pkg: gtkglextmm-1.2.0_10 installed
Dec 30 21:12:51 gordo pkg-static: gtkglarea-2.0.1_7 installed
Dec 30 21:14:41 gordo pkg: ftgl-2.1.3.r5_5,1 installed
```


----------



## antoniog120 (Jan 2, 2017)

Ok I am on chapter 3 quick porting in the handbook and I am a bit confused on section 3.2.2. pkg-plist. How do I figure out all the files the port installs? When I built FSV from source I ran the make install command which installed the files. I see some output on the files it installed but the output is all over the place mixed up with other commands. Is there a better way of figuring this out?


----------



## tobik@ (Jan 2, 2017)

antoniog120 said:


> Is there a better way of figuring this out?


You can use `make makeplist > pkg-plist` to generate the initial pkg-plist. You still have to check it afterwards however and make sure to remove the first line. See [2] and the tip in [1].

[1] https://www.freebsd.org/doc/en_US.I...-handbook/porting-desc.html#porting-pkg-plist
[2] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-autoplist.html


----------



## SirDice (Jan 2, 2017)

Phishfry said:


> For Example FreeBSD 9.0 probably has this in its ports collection as it was released before this dropped off.


All versions of FreeBSD use the exact same ports tree.


----------



## antoniog120 (Jan 2, 2017)

q


tobik said:


> You can use `make makeplist > pkg-plist` to generate the initial pkg-plist. You still have to check it afterwards however and make sure to remove the first line. See [2] and the tip in [1].
> 
> [1] https://www.freebsd.org/doc/en_US.I...-handbook/porting-desc.html#porting-pkg-plist
> [2] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-autoplist.html



I tried that command you stated and it didn't know how to make "makeplist". Here is the output from within the fsv source directory.


```
root@gordo:/home/antonio/fsv2-1.1.0 # make makeplist > /tmp/pkg-plist
make: don't know how to make makeplist. Stop
root@gordo:/home/antonio/fsv2-1.1.0 #
```


----------



## antoniog120 (Jan 2, 2017)

SirDice said:


> All versions of FreeBSD use the exact same ports tree.


Thanks I didn't know this.


----------



## antoniog120 (Jan 3, 2017)

Does anyone else have any advice on how to build the the pkg-plist in the quick porting process? I received one suggestion but it did not work.


----------



## SirDice (Jan 3, 2017)

Did you have a look at this section? https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-autoplist.html

Note, `make makeplist` needs to be run inside the "port" you created, not the original source.


----------



## antoniog120 (Jan 3, 2017)

SirDice said:


> Did you have a look at this section? https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-autoplist.html
> 
> Note, `make makeplist` needs to be run inside the "port" you created, not the original source.



No I did not. I was reading Chapter 3 quick port so I did not jump to chapter 7.

Ok I did not know that. I ran the make makeplist inside the port directory I created with the two files "Makefile" and "pkg-descr" residing there. However I am running into a problem where when I run that command it's looking for a source file called fsv2-1.1.0.tar.gz but the file is called fsv2-1.1.0.tar.bz2 how can this be corrected? See below. The URL for the source file is http://fedorchenko.net/src/fsv2-1.1.0.tar.bz2


```
root@gordo:/home/antonio/fsv # make makeplist > /tmp/pkg-plist
fetch: http://fedorchenko.net/src/fsv2-1.1.0.tar.gz: Not Found
fetch: http://distcache.FreeBSD.org/ports-distfiles/fsv2-1.1.0.tar.gz: Not Found
root@gordo:/home/antonio/fsv #
```


```
root@gordo:/usr/ports/distfiles # cat /tmp/pkg-plist
/!\ fsv2-1.1.0: Makefile warnings, please consider fixing /!\

Not validating first entry in CATEGORIES due to being outside of PORTSDIR. Please ensure this is proper when committing.
Please set LICENSE for this port

===>   fsv2-1.1.0 depends on file: /usr/local/sbin/pkg - found
=> fsv2-1.1.0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://fedorchenko.net/src/fsv2-1.1.0.tar.gz
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/fsv2-1.1.0.tar.gz
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/usr/ports/distfiles #
```


----------



## abishai (Jan 3, 2017)

https://github.com/freebsd/freebsd-ports/blob/master/Mk/bsd.port.mk#L88
See DISTFILES and EXTRACT_SUFX description.


----------



## antoniog120 (Jan 3, 2017)

abishai said:


> https://github.com/freebsd/freebsd-ports/blob/master/Mk/bsd.port.mk#L88
> See DISTFILES and EXTRACT_SUFX description.



The DISTFILES value in the make file worked thanks. DISTFILES=      fsv2-1.1.0.tar.bz2.

I receive no errors when I run the command now. But when I check the output of the text file I redirected the output to it complains about a checksum file not being present. Is this normal?


```
root@gordo:/home/antonio/fsv # cat /tmp/pkg-plist
/!\ fsv2-1.1.0: Makefile warnings, please consider fixing /!\

Not validating first entry in CATEGORIES due to being outside of PORTSDIR. Please ensure this is proper when committing.
Please set LICENSE for this port

===>   fsv2-1.1.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by fsv2-1.1.0 for building
===>  Extracting for fsv2-1.1.0
=> No checksum file (/usr/home/antonio/fsv/distinfo).
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/home/antonio/fsv #
```


----------



## SirDice (Jan 4, 2017)

`make makesum` will download the file and create the correct checksums.


----------



## antoniog120 (Jan 4, 2017)

SirDice said:


> `make makesum` will download the file and create the correct checksums.



Thanks that worked it created the checksum file and I no longer get that error. However I am now getting a new error when I run the makeplist > /tmp/pkg-plist command.  It states that it cannot open the Makefile but when I check the permissions on that file it is 755 so it should be able to open it right? Also the output of the /tmp/pkg-plist displays a make error with error code 1 probably related to the first error. Any input into what is wrong?


```
root@gordo:/home/antonio/fsv # make makeplist > /tmp/pkg-plist
make[1]: cannot open Makefile.
root@gordo:/home/antonio/fsv # cat /tmp/pkg-plist
===>  Building for fsv2-1.1.0

make[1]: stopped in /usr/home/antonio/fsv/work/fsv2-1.1.0
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/home/antonio/fsv #
```


----------



## abishai (Jan 5, 2017)

You should provide building mechanism for your port. make doesn't know what to do with sources.
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/building.html#USING-CONFIGURE
Probably, it's *GNU_CONFIGURE=yes*


----------



## SirDice (Jan 5, 2017)

Can you post the Makefile you have now? Doesn't matter if it's incomplete. I'm sure we can help out to make it work.


----------



## antoniog120 (Jan 5, 2017)

SirDice said:


> Can you post the Makefile you have now? Doesn't matter if it's incomplete. I'm sure we can help out to make it work.



Sure here is the output of my makefile:


```
root@gordo:/home/antonio/fsv # cat Makefile
# $FreeBSD$

PORTNAME=    fsv2
PORTVERSION=    1.1.0
CATEGORIES=    x11
DISTFILES=    fsv2-1.1.0.tar.bz2
MASTER_SITES=    http://fedorchenko.net/src/

MAINTAINER=    antonio@triforce.info
COMMENT=    3D filesystem visualizer

.include <bsd.port.mk>
root@gordo:/home/antonio/fsv #
```


----------



## acheron (Jan 5, 2017)

What abishai said: put `GNU_CONFIGURE=yes`


----------



## antoniog120 (Jan 5, 2017)

abishai said:


> You should provide building mechanism for your port. make doesn't know what to do with sources.
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/building.html#USING-CONFIGURE
> Probably, it's *GNU_CONFIGURE=yes*


 Ok and where do I define GNU_CONFIGURE=yes within the make file itself?


----------



## acheron (Jan 5, 2017)

Yes.


----------



## SirDice (Jan 5, 2017)

antoniog120 said:


> Ok and where do I define GNU_CONFIGURE=yes within the make file itself?


Doesn't matter much, as long as it's above the bsd.port.mk line. But typically you keep the same order as things are executed. If you're not sure about things have a look at other ports. I regularly just look at how other ports deal with stuff then try to mimic what I need from it. Most ports have a fairly simple and straight-forward Makefile. Once you know which bit does what it's actually quite readable.


```
HEADER 

DEFINITIONS

CONFIGURE (options)

MAKE (options)

INSTALL (options)
```


----------



## antoniog120 (Jan 5, 2017)

acheron said:


> Yes.



Yeah I did that and I still receive the same error.


```
root@gordo:/home/antonio/fsv # cat Makefile
# $FreeBSD$

PORTNAME=    fsv2
PORTVERSION=    1.1.0
CATEGORIES=    x11
DISTFILES=    fsv2-1.1.0.tar.bz2
GNU_CONFIGURE=  yes
MASTER_SITES=    http://fedorchenko.net/src/

MAINTAINER=    antonio@triforce.info
COMMENT=    3D filesystem visualizer

.include <bsd.port.mk>
root@gordo:/home/antonio/fsv # make makeplist > /tmp/pkg-plist
make[1]: cannot open Makefile.
root@gordo:/home/antonio/fsv # cat /tmp/pkg-plist
===>  Building for fsv2-1.1.0

make[1]: stopped in /usr/home/antonio/fsv/work/fsv2-1.1.0
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/home/antonio/fsv #
```


----------



## antoniog120 (Jan 5, 2017)

SirDice said:


> Doesn't matter much, as long as it's above the bsd.port.mk line. But typically you keep the same order as things are executed. If you're not sure about things have a look at other ports. I regularly just look at how other ports deal with stuff then try to mimic what I need from it. Most ports have a fairly simple and straight-forward Makefile. Once you know which bit does what it's actually quite readable.
> 
> 
> ```
> ...



Ok I was looking at the mtr-nox11 port which I have installed on my FreeBSD system and it seems to have fewer lines than my Makefile and it works.


```
root@gordo:/usr/ports/net/mtr-nox11 # cat Makefile
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD: head/net/mtr-nox11/Makefile 383956 2015-04-13 19:25:28Z sunpoet $

PKGNAMESUFFIX=    -nox11

MASTERDIR=    ${.CURDIR}/../mtr

OPTIONS_EXCLUDE=X11
OPTIONS_FILE_UNSET=    X11

.include "${MASTERDIR}/Makefile"
root@gordo:/usr/ports/net/mtr-nox11 #
```


----------



## abishai (Jan 5, 2017)

Do not forget to `make clean` after any alteration of Makefile. Things might be cached. Also, it's not worth to run `make makeplist` before ports actually compiles, as plist option runs after STAGE. Just simple `make` is enough.


----------



## tingo (Jan 5, 2017)

antoniog120 said:


> Ok I was looking at the mtr-nox11 port which I have installed on my FreeBSD system and it seems to have fewer lines than my Makefile and it works.


That is a slave port (as defined by the MASTERDIR line). In that case, look at the master port as well.
Or choose a port which is not a slave port to use as an example.


----------



## antoniog120 (Jan 6, 2017)

abishai said:


> Do not forget to `make clean` after any alteration of Makefile. Things might be cached. Also, it's not worth to run `make makeplist` before ports actually compiles, as plist option runs after STAGE. Just simple `make` is enough.



Ok I did that. `make clean`. Then I ran the make command by itself and it proceeded fine for a while but then generated several dependency errors. When I read the chapter 3 quick porting section it didn't state anything about dependencies where I am in making the `make plist` I guess I'm suppose add all these values to the make file?


```
libtool: install: /usr/bin/install -c .libs/libfsvui.so.0 /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.so.0
libtool: install: (cd /usr/home/antonio/fsv/work/stage/usr/local/lib && { ln -s -f libfsvui.so.0 libfsvui.so || { rm -f libfsvui.so && ln -s libfsvui.so.0 libfsvui.so; }; })
libtool: install: (cd /usr/home/antonio/fsv/work/stage/usr/local/lib && { ln -s -f libfsvui.so.0 libfsvui.so || { rm -f libfsvui.so && ln -s libfsvui.so.0 libfsvui.so; }; })
libtool: install: /usr/bin/install -c .libs/libfsvui.lai /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.la
libtool: install: /usr/bin/install -c .libs/libfsvui.a /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: chmod 644 /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: ranlib /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
test -z "/usr/local/include/fsv2" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2"
 install  -m 0644 'ColorCellRenderer.h' '/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2/ColorCellRenderer.h'
 install  -m 0644 'ColorCellEditable.h' '/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2/ColorCellEditable.h'
Making install in src
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/bin"
  /bin/sh ../libtool   --mode=install install  -s -m 555 'fsv2' '/usr/home/antonio/fsv/work/stage/usr/local/bin/fsv2'
libtool: install: install -m 555 -s .libs/fsv2 /usr/home/antonio/fsv/work/stage/usr/local/bin/fsv2
test -z "/usr/local/share/applications" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/share/applications"
 install  -m 0644 'fsv2.desktop' '/usr/home/antonio/fsv/work/stage/usr/local/share/applications/fsv2.desktop'
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
Warning: 'lib/libfsvui.so.0' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Error: .la libraries found, port needs USES=libtool
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgtkmm-2.4.so.1 from x11-toolkits/gtkmm24 but it is not declared as a dependency
Warning: you need USE_GNOME+=gtkmm24
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libatkmm-1.6.so.1 from accessibility/atkmm but it is not declared as a dependency
Warning: you need USE_GNOME+=atkmm
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgdkmm-2.4.so.1 from x11-toolkits/gtkmm24 but it is not declared as a dependency
Warning: you need USE_GNOME+=gtkmm24
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgiomm-2.4.so.1 from devel/glibmm but it is not declared as a dependency
Warning: you need USE_GNOME+=glibmm
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libpangomm-1.4.so.1 from x11-toolkits/pangomm but it is not declared as a dependency
Warning: you need USE_GNOME+=pangomm
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libglibmm-2.4.so.1 from devel/glibmm but it is not declared as a dependency
Warning: you need USE_GNOME+=glibmm
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libcairomm-1.0.so.1 from graphics/cairomm but it is not declared as a dependency
Warning: you need USE_GNOME+=cairomm
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libsigc-2.0.so.0 from devel/libsigc++20 but it is not declared as a dependency
Warning: you need USE_GNOME+=libsigc++20
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgtkgl-2.0.so.1 from x11-toolkits/gtkglarea2 but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libgtkgl-2.0.so:x11-toolkits/gtkglarea2
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libGLU.so.1 from graphics/libGLU but it is not declared as a dependency
Warning: you need USE_GL+=glu
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/.mesa/libGL.so from graphics/libGL but it is not declared as a dependency
Warning: you need USE_GL+=gl
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgtk-x11-2.0.so.0 from x11-toolkits/gtk20 but it is not declared as a dependency
Warning: you need USE_GNOME+=gtk20
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgdk-x11-2.0.so.0 from x11-toolkits/gtk20 but it is not declared as a dependency
Warning: you need USE_GNOME+=gtk20
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libpangocairo-1.0.so.0 from x11-toolkits/pango but it is not declared as a dependency
Warning: you need USE_GNOME+=pango
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libatk-1.0.so.0 from accessibility/atk but it is not declared as a dependency
Warning: you need USE_GNOME+=atk
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libcairo.so.2 from graphics/cairo but it is not declared as a dependency
Warning: you need USE_GNOME+=cairo
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgdk_pixbuf-2.0.so.0 from graphics/gdk-pixbuf2 but it is not declared as a dependency
Warning: you need USE_GNOME+=gdkpixbuf2
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgio-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libpangoft2-1.0.so.0 from x11-toolkits/pango but it is not declared as a dependency
Warning: you need USE_GNOME+=pango
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libpango-1.0.so.0 from x11-toolkits/pango but it is not declared as a dependency
Warning: you need USE_GNOME+=pango
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libgobject-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libglib-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libintl.so.8 from devel/gettext-runtime but it is not declared as a dependency
Warning: you need USES+=gettext-runtime
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libfontconfig.so.1 from x11-fonts/fontconfig but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libfontconfig.so:x11-fonts/fontconfig
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libfreetype.so.6 from print/freetype2 but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libfreetype.so:print/freetype2
Error: /usr/local/bin/fsv2 is linked to /usr/local/lib/libftgl.so.2 from graphics/ftgl but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libftgl.so:graphics/ftgl
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/home/antonio/fsv #
```


----------



## antoniog120 (Jan 6, 2017)

Ok I added all those dependencies that make was throwing errors out on to the makefile and now I just have make complaining about a single error. It states that it needs USES=libtool but when I check my makefile that statement is present so I do not get why it's complaining about a statement that is there. 


```
libtool: install: ranlib /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
test -z "/usr/local/include/fsv2" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2"
 install  -m 0644 'ColorCellRenderer.h' '/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2/ColorCellRenderer.h'
 install  -m 0644 'ColorCellEditable.h' '/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2/ColorCellEditable.h'
Making install in src
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/bin"
 STRIPPROG='strip' /bin/sh ../libtool   --mode=install /bin/sh /usr/home/antonio/fsv/work/fsv2-1.1.0/install-sh -c -s 'fsv2' '/usr/home/antonio/fsv/work/stage/usr/local/bin/fsv2'
libtool: install: /bin/sh /usr/home/antonio/fsv/work/fsv2-1.1.0/install-sh -c -s .libs/fsv2 /usr/home/antonio/fsv/work/stage/usr/local/bin/fsv2
test -z "/usr/local/share/applications" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/share/applications"
 install  -m 0644 'fsv2.desktop' '/usr/home/antonio/fsv/work/stage/usr/local/share/applications/fsv2.desktop'
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
Error: .la libraries found, port needs USES=libtool
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/home/antonio/fsv #
```


```
root@gordo:/home/antonio/fsv # cat Makefile
# $FreeBSD$

PORTNAME=    fsv2
PORTVERSION=    1.1.0
CATEGORIES=    x11
DISTFILES=    fsv2-1.1.0.tar.bz2
GNU_CONFIGURE=  yes
INSTALL_TARGET=install-strip

USES=libtool
USE_GNOME+=gtkmm24
USE_GNOME+=atkmm
USE_GNOME+=gtkmm24
USE_GNOME+=glibmm
USE_GNOME+=pangomm
USE_GNOME+=glibmm
USE_GNOME+=cairomm
USE_GNOME+=libsigc++20
USE_GL+=glu
USE_GL+=gl
USE_GNOME+=gtk20
USE_GNOME+=gtk20
USE_GNOME+=atk
USE_GNOME+=cairo
USE_GNOME+=gdkpixbuf2
LIB_DEPENDS+=libgtkgl-2.0.so:x11-toolkits/gtkglarea2
LIB_DEPENDS+=libfontconfig.so:x11-fonts/fontconfig
LIB_DEPENDS+=libfreetype.so:print/freetype2
LIB_DEPENDS+=libftgl.so:graphics/ftgl

USES=           gettext-runtime
MASTER_SITES=    http://fedorchenko.net/src/

MAINTAINER=    antonio@triforce.info
COMMENT=    3D filesystem visualizer

.include <bsd.port.mk>
root@gordo:/home/antonio/fsv #
```


----------



## acheron (Jan 6, 2017)

Nope libtool is not in the USES list:

```
USES= libtool
<snip>
USES= gettext-runtime
```
So USES only contains gettext-runtime.

By the way, you can merge in one line all the list and remove the redundancy: 
	
	



```
USE_GL=gl glu
USE_GNOME=gtkmm24 glibmm ...
USES= gettext-runtime libtool
LIB_DEPENDS= libgtkgl-2.0.so:x11-toolkits/gtkglarea2 \
[INDENT][INDENT][INDENT][INDENT]libfontconfig.so:x11-fonts/fontconfig \
...[/INDENT][/INDENT][/INDENT][/INDENT]
```


----------



## antoniog120 (Jan 6, 2017)

acheron said:


> Nope libtool is not in the USES list:
> 
> ```
> USES= libtool
> ...




Ok I did the formatting you mentioned but I still receive the same error in regard to  USES= libtool. You stated that libtool is not in the USES list so I removed the line since it is not valid as you stated. So I ran the make command again and received the same error. If libtool is not in USES why is it stating to add it to the makefile then?


```
root@gordo:/home/antonio/fsv # cat Makefile
# $FreeBSD$

PORTNAME=    fsv2
PORTVERSION=    1.1.0
CATEGORIES=    x11
DISTFILES=    fsv2-1.1.0.tar.bz2
GNU_CONFIGURE=  yes
INSTALL_TARGET=install-strip

USE_GNOME+=gtkmm24 atkmm glibmm pangomm cairomm libsigc++20 gtk20 atk cairo gdkpixbuf2
USE_GL+=gl glu
LIB_DEPENDS+=libgtkgl-2.0.so:x11-toolkits/gtkglarea2 \
             libfontconfig.so:x11-fonts/fontconfig \
             libfreetype.so:print/freetype2 \
             libftgl.so:graphics/ftgl

USES=           gettext-runtime
MASTER_SITES=    http://fedorchenko.net/src/

MAINTAINER=    antonio@triforce.info
COMMENT=    3D filesystem visualizer

.include <bsd.port.mk>
root@gordo:/home/antonio/fsv #
```



```
libtool: install: /usr/bin/install -c .libs/libfsvui.so.0 /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.so.0
libtool: install: strip --strip-unneeded /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.so.0
libtool: install: (cd /usr/home/antonio/fsv/work/stage/usr/local/lib && { ln -s -f libfsvui.so.0 libfsvui.so || { rm -f libfsvui.so && ln -s libfsvui.so.0 libfsvui.so; }; })
libtool: install: (cd /usr/home/antonio/fsv/work/stage/usr/local/lib && { ln -s -f libfsvui.so.0 libfsvui.so || { rm -f libfsvui.so && ln -s libfsvui.so.0 libfsvui.so; }; })
libtool: install: /usr/bin/install -c .libs/libfsvui.lai /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.la
libtool: install: /usr/bin/install -c .libs/libfsvui.a /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: strip --strip-debug /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: chmod 644 /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: ranlib /usr/home/antonio/fsv/work/stage/usr/local/lib/libfsvui.a
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
test -z "/usr/local/include/fsv2" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2"
 install  -m 0644 'ColorCellRenderer.h' '/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2/ColorCellRenderer.h'
 install  -m 0644 'ColorCellEditable.h' '/usr/home/antonio/fsv/work/stage/usr/local/include/fsv2/ColorCellEditable.h'
Making install in src
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/bin"
 STRIPPROG='strip' /bin/sh ../libtool   --mode=install /bin/sh /usr/home/antonio/fsv/work/fsv2-1.1.0/install-sh -c -s 'fsv2' '/usr/home/antonio/fsv/work/stage/usr/local/bin/fsv2'
libtool: install: /bin/sh /usr/home/antonio/fsv/work/fsv2-1.1.0/install-sh -c -s .libs/fsv2 /usr/home/antonio/fsv/work/stage/usr/local/bin/fsv2
test -z "/usr/local/share/applications" || /bin/mkdir -p "/usr/home/antonio/fsv/work/stage/usr/local/share/applications"
 install  -m 0644 'fsv2.desktop' '/usr/home/antonio/fsv/work/stage/usr/local/share/applications/fsv2.desktop'
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
Error: .la libraries found, port needs USES=libtool
*** Error code 1

Stop.
make: stopped in /usr/home/antonio/fsv
root@gordo:/home/antonio/fsv #
```


----------



## acheron (Jan 6, 2017)

What I meant is that you either need to use:

```
USES= libtool
USES+= gettext-runtime
```
or `USES= gettext-runtime libtool`

If you don't put the '+' you overwrite the USES 'variable' and libtool 'disappear'


----------



## antoniog120 (Jan 6, 2017)

Alright I was able to correct the makefile so that make compiles with no errors now. I did include USES=libtool but for gettest-runtime I used USES+=gettext-runtime instead of USES=gettext-runtime then all my "USES" errors went away. You can see the working makefile below.


```
root@gordo:/home/antonio/fsv # cat Makefile
# $FreeBSD$

PORTNAME=    fsv2
PORTVERSION=    1.1.0
CATEGORIES=    x11
DISTFILES=    fsv2-1.1.0.tar.bz2
GNU_CONFIGURE=  yes
INSTALL_TARGET=install-strip

USE_GNOME+=gtkmm24 atkmm glibmm pangomm cairomm libsigc++20 gtk20 atk cairo gdkpixbuf2
USE_GL+=gl glu
LIB_DEPENDS+=libgtkgl-2.0.so:x11-toolkits/gtkglarea2 \
             libfontconfig.so:x11-fonts/fontconfig \
             libfreetype.so:print/freetype2 \
             libftgl.so:graphics/ftgl

USES=           libtool
USES+=gettext-runtime
MASTER_SITES=    http://fedorchenko.net/src/

MAINTAINER=    antonio@triforce.info
COMMENT=    3D filesystem visualizer

.include <bsd.port.mk>
root@gordo:/home/antonio/fsv #
```


----------



## acheron (Jan 6, 2017)

You can run `portlint -AC` now (install ports-mgmt/portlint first)


----------



## antoniog120 (Jan 6, 2017)

This verifies my FreeBSD port directory? I've never run this command before.


----------



## antoniog120 (Jan 6, 2017)

acheron said:


> You can run `portlint -AC` now (install ports-mgmt/portlint first)



This verifies my FreeBSD port directory? I've never run this command before.


----------



## antoniog120 (Jan 7, 2017)

Great news gentlemen I was able to do section 3.4 Testing the port successfully on the FreeBSD porting handbook. I am now on the final section 3.6 submitting the new port. I will be submitting the port soon. Thanks for all your help. This is my first time submitting a port to FreeBSD.


----------



## tingo (Jan 8, 2017)

Well done!


----------

