Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
porting freebsd application to linux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
mrpringle
Apprentice
Apprentice


Joined: 27 May 2007
Posts: 284

PostPosted: Fri Jul 04, 2008 12:41 pm    Post subject: porting freebsd application to linux Reply with quote

I am trying to get the following program to work with linux: http://caia.swin.edu.au/tools/spp/downloads.html
It compiles fine under freebsd but I run into several errors when making under linux.
I have limited experience in C programming, makefiles, etc, so I was wondering if anyone could give me an idea of how difficult it would be to get this app running under linux.

Thanks


Last edited by mrpringle on Fri Jul 04, 2008 10:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
farhaven
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2008
Posts: 127

PostPosted: Fri Jul 04, 2008 1:44 pm    Post subject: Reply with quote

That should prove rather hard, especially because your link gives a 404 :P

Edit: After fixing your link (there was a dot too much on the end), I downloaded the tarball and compiled the source with a simple "make"
The program then starts, prompting me to provide two IP addresses, but I didn't get any further, mostly because I don't know its purpose.

What errors do you receive?
Back to top
View user's profile Send private message
alphacube
n00b
n00b


Joined: 14 Jan 2007
Posts: 38

PostPosted: Fri Jul 04, 2008 2:32 pm    Post subject: Reply with quote

I tried to but got these error during make.

Code:

cc -I/usr/local/include  -DDEBUG -g -c src/crc32.c -o src/crc32.o
cc -I/usr/local/include  -DDEBUG -g -c src/instance.c -o src/instance.o
src/instance.c: In function 'removeOldInstances':
src/instance.c:393: error: 'entries' undeclared (first use in this function)
src/instance.c:393: error: (Each undeclared identifier is reported only once
src/instance.c:393: error: for each function it appears in.)
src/instance.c:393: error: expected ';' before '{' token
make: *** [src/instance.o] Error 1

_________________
\\Alphacube
Back to top
View user's profile Send private message
farhaven
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2008
Posts: 127

PostPosted: Fri Jul 04, 2008 2:58 pm    Post subject: Reply with quote

Can you check if /usr/include/sys/queue.h defines TAILQ_ENTRY?

Mine look like this (around line 403):
Code:

403: #define   _TAILQ_ENTRY(type, qual)               \
404: struct {                        \
405:    qual type *tqe_next;      /* next element */      \
406:   qual type *qual *tqe_prev;   /* address of previous next element */\
407: }
408: #define TAILQ_ENTRY(type)   _TAILQ_ENTRY(struct type,)


I suspect issues with TAILQ_ENTRY as the undefined "entry" referenced in instance.c, line 393 is declared using the TAILQ_ENTRY macro
Back to top
View user's profile Send private message
mrpringle
Apprentice
Apprentice


Joined: 27 May 2007
Posts: 284

PostPosted: Fri Jul 04, 2008 10:36 pm    Post subject: Reply with quote

farhaven wrote:
Can you check if /usr/include/sys/queue.h defines TAILQ_ENTRY?

Mine look like this (around line 403):
Code:

403: #define   _TAILQ_ENTRY(type, qual)               \
404: struct {                        \
405:    qual type *tqe_next;      /* next element */      \
406:   qual type *qual *tqe_prev;   /* address of previous next element */\
407: }
408: #define TAILQ_ENTRY(type)   _TAILQ_ENTRY(struct type,)


I suspect issues with TAILQ_ENTRY as the undefined "entry" referenced in instance.c, line 393 is declared using the TAILQ_ENTRY macro


Is this a difficult problem to fix?
Back to top
View user's profile Send private message
farhaven
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2008
Posts: 127

PostPosted: Sat Jul 05, 2008 12:24 am    Post subject: Reply with quote

To be honest, I don't know.

But as I didn't take any special measures to get the compilation going, I don't think this is impossible to solve.

My emerge --info looks like this, maybe you could post yours so we could check for differences:

Code:
Portage 2.2_rc1 (default-linux/x86/2007.0, gcc-4.2.3, glibc-2.8_p20080602-r0, 2.6.25.8 i686)
=================================================================
System uname: Linux-2.6.25.8-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-glibc2.0
Timestamp of tree: Wed, 02 Jul 2008 11:15:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.3
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo "
LDFLAGS=""
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aac aalib acl acpi alsa amr amrnb amrwb ao bash-completion blender-game bogofilter bzip2 cli cracklib crypt curl dbus dillo directfb dri dv dvd dvdr encode equalizer fat fbcon ffmpeg flac fortran ftp gdbm gif gimp gopher gpac gpm gstreamer gtk hal hddtemp iconv icq id3 id3tag ieee1394 image imlib irc isdnlog jabber javascript joystick jpeg jpeg2k kqemu lame latex libsamplerate mad maps math menubar midi mikmod mmx modelock mp3 mpeg mudflap multiuser ncurses net nls nptlonly offensive ogg openal opengl openmp oss pam pcre pdf perl png pppd python qt-static quicktime readline reflection rplay scanner sdl session skins smp sndfile snmp sox spl sse sse2 ssl startup-notification svg tagwriting tcpd theora threads truetype unicode usb vcd vim-with-x vnc vorbis wifi win32codecs wma wxwindows x86 xcomposite xinerama xml xorg xpm xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1        emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m  maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="ati radeon r300"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Back to top
View user's profile Send private message
mrpringle
Apprentice
Apprentice


Joined: 27 May 2007
Posts: 284

PostPosted: Sat Jul 05, 2008 12:46 am    Post subject: Reply with quote

Here is mine, there are a fair few differences with versions:

Code:

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r6 x86_64 Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz
Timestamp of tree: Fri, 04 Jul 2008 22:15:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.iinet.net.au/pub/Gentoo"
LANG="en_AU.utf8"
LC_ALL="en_AU.utf8"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/science"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X a52 aac ace acl acpi alsa amd64 arts berkdb cairo cdr cli cracklib crypt cups dbus divx dri dvd dvdr dvdread emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog java javascript jpeg kde kerberos ldap lm_sensors mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin octave ogg openal opengl openmp pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba sbcl sdl session soup spell spl sse sse2 ssl svg tcpd threads tiff truetype unicode vorbis x264 xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum