LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-24-2016, 09:41 AM   #1
horizn
Member
 
Registered: Jan 2015
Location: UK and Poland
Distribution: Slackware + Debian + Ubuntu
Posts: 170

Rep: Reputation: Disabled
Portsentry won't build


Hi,
I am trying to build PortSentry 1.2_beta - latest available (2013). But unfortonately there is a problem:

Code:
root@:/usr/src/portsentry_beta# make linux
SYSTYPE=linux 
Making 
cc -O -Wall -DLINUX -DSUPPORT_STEALTH -o ./portsentry ./portsentry.c \
        ./portsentry_io.c ./portsentry_util.c 
./portsentry.c: In function 'PortSentryModeTCP':
./portsentry.c:1187:8: warning: pointer targets in passing argument 3 of 'accept' differ in signedness [-Wpointer-sign]
        &length);
        ^
In file included from /usr/include/netinet/in.h:23:0,
                 from /usr/include/netdb.h:27,
                 from ./portsentry.h:30,
                 from ./portsentry.c:20:
/usr/include/sys/socket.h:243:12: note: expected 'socklen_t * restrict {aka unsigned int * restrict}' but argument is of type 'int *'
 extern int accept (int __fd, __SOCKADDR_ARG __addr,
            ^
./portsentry.c: In function 'PortSentryModeUDP':
./portsentry.c:1384:39: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness [-Wpointer-sign]
          (struct sockaddr *) &client, &length) < 0)
                                       ^
In file included from /usr/include/netinet/in.h:23:0,
                 from /usr/include/netdb.h:27,
                 from ./portsentry.h:30,
                 from ./portsentry.c:20:
/usr/include/sys/socket.h:174:16: note: expected 'socklen_t * restrict {aka unsigned int * restrict}' but argument is of type 'int *'
 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
                ^
./portsentry.c: In function 'Usage':
./portsentry.c:1584:11: warning: missing terminating " character
   printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot 
           ^
./portsentry.c:1584:3: error: missing terminating " character
   printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot 
   ^
./portsentry.c:1585:1: error: 'sourceforget' undeclared (first use in this function)
 sourceforget dot net>\n");
 ^
./portsentry.c:1585:1: note: each undeclared identifier is reported only once for each function it appears in
./portsentry.c:1585:14: error: expected ')' before 'dot'
 sourceforget dot net>\n");
              ^
./portsentry.c:1585:14: error: stray '\' in program
./portsentry.c:1585:24: warning: missing terminating " character
 sourceforget dot net>\n");
                        ^
./portsentry.c:1585:14: error: missing terminating " character
 sourceforget dot net>\n");
              ^
./portsentry.c:1595:1: error: expected ';' before '}' token
 }
 ^
./portsentry_io.c: In function 'ConfigTokenRetrieve':
./portsentry_io.c:321:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        if ((strstr (buffer, token) != (char) NULL) && 
                                       ^
./portsentry_io.c:321:36: warning: comparison between pointer and integer
        if ((strstr (buffer, token) != (char) NULL) && 
                                    ^
./portsentry_io.c:324:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     if (strstr (buffer, "\"") == (char) NULL)
                                  ^
./portsentry_io.c:324:31: warning: comparison between pointer and integer
     if (strstr (buffer, "\"") == (char) NULL)
                               ^
./portsentry_io.c: In function 'IsBlocked':
./portsentry_io.c:670:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  if((ipOffset = strstr(buffer, target)) != (char) NULL)
                                            ^
./portsentry_io.c:670:41: warning: comparison between pointer and integer
  if((ipOffset = strstr(buffer, target)) != (char) NULL)
                                         ^
./portsentry_io.c: In function 'SubstString':
./portsentry_io.c:727:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    if (strstr (target, find) == (char) NULL)
                                 ^
./portsentry_io.c:727:30: warning: comparison between pointer and integer
    if (strstr (target, find) == (char) NULL)
                              ^
Makefile:102: recipe for target 'linux' failed
make: *** [linux] Error 1
Any ideas?
 
Old 10-25-2016, 04:56 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
portsentry has stopped its development in 2003 (13 years ago), not 2013.

I tried to port Gentoo's ebuild to Slackware, but consider this build script unmaintained

http://ponce.cc/slackware/testing/portsentry/
 
1 members found this post helpful.
Old 10-26-2016, 04:42 AM   #3
horizn
Member
 
Registered: Jan 2015
Location: UK and Poland
Distribution: Slackware + Debian + Ubuntu
Posts: 170

Original Poster
Rep: Reputation: Disabled
Thanks, it worked. Would you consider add this onto Slackbuilds?
 
Old 10-26-2016, 05:16 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
no, I don't want to maintain a script for sources that are unmaintained upstream since 13 years: enjoy it while it works
 
Old 12-03-2016, 08:33 PM   #5
nmolinos
LQ Newbie
 
Registered: Nov 2003
Location: Richmond, VA
Distribution: Slackware
Posts: 29

Rep: Reputation: 15
There are several warnings that get thrown, but the real problem is this:

Code:
./portsentry.c: In function 'Usage':
./portsentry.c:1584:11: warning: missing terminating " character
   printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot 
           ^
./portsentry.c:1584:3: error: missing terminating " character
   printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot 
   ^
./portsentry.c:1585:1: error: 'sourceforget' undeclared (first use in this function)
 sourceforget dot net>\n");
^

Open portsentry.c with a text editor and modify line 1584/1585. Remove the line break so that the whole printf(); statement is on one line. Portsentry should then build (with warnings).
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] avidemux won't build FTIO Slackware 32 03-12-2015 07:58 AM
BASH won't build... Please help! lukeiamyourfather Linux From Scratch 6 07-29-2007 04:24 PM
FSViewer won't build? Bonzodog Slackware 1 09-04-2005 04:44 AM
Why won't kdebase-3.3.0 build? craigs1987 Linux - Software 1 10-01-2004 05:07 PM
how to change notification email for portsentry and how to test portsentry roorings Linux - Security 1 11-04-2003 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration