From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Tue, 16 Apr 2002 04:23:42 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 195 ************************************************** Monday 15 April 2002 Number 195 ************************************************** Subjects for today 1 Re: Problem with cmd that calls Perl : Henry Sobotka 2 Re: Problem with cmd that calls Perl : Edwin Guenthner 3 Re: compiling c++ program under gcc 3.0.3 : Holger Veit 4 compiling c++ program under gcc 3.0.3 : Arnstein.Prytz at jcu.edu.au 5 Is there a makepkg script? : Charlie Smith 6 Re: compiling c++ program under gcc 3.0.3 : Andrew Zabolotny" 7 Re: CDDB Server : Dave and Natalie" 8 CDDB Server : John Poltorak 9 Re: CDDB Server : Dave and Natalie" **= Email 1 ==========================** Date: Tue, 16 Apr 2002 06:58:55 -0400 From: Henry Sobotka Subject: Re: Problem with cmd that calls Perl Edwin Guenthner wrote: > > >What happens if you try the same thing with a non-REXX plain batch file > >or sh script? > > I guess it would work, but then passing the args isnt perfect ;-( Since the SIGSEGV doesn't happen when you run perl_.exe directly, that suggests it's not occurring in perl_.exe or your compiled module, but in REXX. If that is the case, a non-REXX script might be your only immediate option. > I will try bringing perl.exe into the path; maybe that will help. I don't think it will; I mentioned it only to rule out the possibility that running "perl myscript" was actually calling perl.exe instead of perl.cmd. h~ **= Email 2 ==========================** Date: Tue, 16 Apr 2002 08:17:37 +0200 From: Edwin Guenthner Subject: Re: Problem with cmd that calls Perl Hi Henry, >> Calling perl.cmd works fine; I was able to run some tests scripts - >> but when I try to run a test script, that uses my compiled extension- >> it will give me a sigsev and core dump. > >I assume you don't have perl.exe in your PATH... Correct. I dont want to change my config.szs; and there are some reasons why I need the rexx stuff in there (with the batch file there is no proper way to hand over all the command line args to the call to perl itself). >Any record of the SIGSEGV in popuplog.os2? Didnt check that. > >What happens if you try the same thing with a non-REXX plain batch file >or sh script? I guess it would work, but then passing the args isnt perfect ;-( I will try bringing perl.exe into the path; maybe that will help. **= Email 3 ==========================** Date: Tue, 16 Apr 2002 09:31:11 +0200 From: Holger Veit Subject: Re: compiling c++ program under gcc 3.0.3 On Tue, Apr 16, 2002 at 11:49:52AM -0400, Arnstein.Prytz at jcu.edu.au wrote: > Dear list members, > > I am showing an almost complete lack of knowledge here, but hope > that someone will be able to help. I have installed the latest > version of the gcc compiler (3.0.3) from the netlabs incoming > directory. I had the same problem with 3.0.2. I have > installed binutils-os2-2.11.2-bin, gettext-os2-0.10.40-bin and > emx-strt-fix-0.0.2, as stated in the install file. > > While compiling a fairly simple c++ file, I get a whole heap of > unresolved externals, like this > > > g++ filter.cpp [...] > > Reverting back to the compiler that comes with emx I can compile > succcessfully using > > gpp filter.cpp -lstdcpp > > I've tried to add various -lxxx options to the 3.0.3 command line, > but to no avail. Having done a search of ALL files in the emx > tree I can find no reference to __ZN3... etc. So, the compiler > is somehow generating these, but cannot link to needed libraries. > > So, what subtle or blindingly obvious point am I missing? You cannot use or link against old 2.xxx C++ libraries with g++ 3.xx; the naming conventions (and more significant the format of internal tables) are different. You need specific C++ libraries compiled with g++ 3.xx. This specifically applies to stdc++.{a,lib}. You likely have old versions of these libs in your installation tree. Holger -- Please update your tables to my new e-mail address: holger.veit$ais.fhg.de (replace the '$' with ' at ' -- spam-protection) **= Email 4 ==========================** Date: Tue, 16 Apr 2002 11:49:52 -0400 From: Arnstein.Prytz at jcu.edu.au Subject: compiling c++ program under gcc 3.0.3 Dear list members, I am showing an almost complete lack of knowledge here, but hope that someone will be able to help. I have installed the latest version of the gcc compiler (3.0.3) from the netlabs incoming directory. I had the same problem with 3.0.2. I have installed binutils-os2-2.11.2-bin, gettext-os2-0.10.40-bin and emx-strt-fix-0.0.2, as stated in the install file. While compiling a fairly simple c++ file, I get a whole heap of unresolved externals, like this > g++ filter.cpp d:/tmp/ccJsl8nu.o: Undefined symbol _cout referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN7ostreamlsEPKc referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol _cin referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN7istreamrsERi referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol _cout referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN7ostreamlsEPKc referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol _cin referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN7istreamrsEPc referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN8ifstream4openEPKcii referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZNK3ios4failEv referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN7istreamrsERi referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol __ZN11fstreambase5closeEv referenced from text segment d:/tmp/ccJsl8nu.o: Undefined symbol _cout referenced from text segment ...... etc ..... Reverting back to the compiler that comes with emx I can compile succcessfully using gpp filter.cpp -lstdcpp I've tried to add various -lxxx options to the 3.0.3 command line, but to no avail. Having done a search of ALL files in the emx tree I can find no reference to __ZN3... etc. So, the compiler is somehow generating these, but cannot link to needed libraries. So, what subtle or blindingly obvious point am I missing? Thank you, Arnstein ------------------------------------------------------------------ Arnstein Prytz Arnstein.Prytz at jcu.edu.au School of Maths and Physics ph: 61-7-47815183 James Cook University fax: 61-7-47815880 Townsville, Queensland 4811, Australia ------------------------------------------------------------------ **= Email 5 ==========================** Date: Tue, 16 Apr 2002 11:57:23 -0500 From: Charlie Smith Subject: Is there a makepkg script? The subject says it all :) Is there a 'makepkg.cmd' script to go along with lspkg.cmd, installpkg.cmd, removepkg.cmd and upgradepkg.cmd? Thanks Charlie **= Email 6 ==========================** Date: Tue, 16 Apr 2002 14:33:55 +0400 From: "Andrew Zabolotny" Subject: Re: compiling c++ program under gcc 3.0.3 On Tue, 16 Apr 2002 11:49:52 -0400, Arnstein.Prytz at jcu.edu.au wrote: >I am showing an almost complete lack of knowledge here, but hope >that someone will be able to help. I have installed the latest >version of the gcc compiler (3.0.3) from the netlabs incoming >directory. I had the same problem with 3.0.2. I have >installed binutils-os2-2.11.2-bin, gettext-os2-0.10.40-bin and >emx-strt-fix-0.0.2, as stated in the install file. Okay, so I assume you have installed the gcc-os2-3.0.3-beta-gpp.zip file, thus you have the /emx/lib/gcc-lib/i386-pc-os2_emx/3.0.3/ subdirectory, and a "cc1plus.exe", "st/stdcxx.a" and "mt/stdcxx.a" inside it. Now go there and type "make". Everything should go fine. Now you should remove from all your C_INCLUDE_PATH, CPLUS_INCLUDE_PATH and LIBRARY_PATH variables any path components which point to any EMX directories. You can leave the os2toolkit directories, if you have them there. For example, I have: C_INCLUDE_PATH=f:/toolkit/inc CPLUS_INCLUDE_PATH=%C_INCLUDE_PATH% LIBRARY_PATH=f:/toolkit/lib I believe now it should work okay for you. Greetings, _\ndy **= Email 7 ==========================** Date: Tue, 16 Apr 2002 19:28:33 -0800 From: "Dave and Natalie" Subject: Re: CDDB Server On Tue, 16 Apr 2002 19:31:38 +0100, John Poltorak wrote: > >Has anyone tried building a CDDB server? > >It's available here:- > >ftp://ftp.freedb.org/pub/freedb/cddbd-1.4.tar.gz > > >I tried but got a number of compile errors:- > >gcc -O -c inet.c >inet.c: In function `get_rmt_hostname': >inet.c:132: `socklen_t' undeclared (first use in this function) >inet.c:132: (Each undeclared identifier is reported only once >inet.c:132: for each function it appears in.) >inet.c:132: parse error before `len' >inet.c:136: `len' undeclared (first use in this function) >inet.c:136: parse error before `sizeof' >inet.c: In function `cddbd_stand': >inet.c:419: `socklen_t' undeclared (first use in this function) >inet.c:419: parse error before `len' >inet.c:471: `len' undeclared (first use in this function) >inet.c:471: parse error before `sizeof' >make: *** [inet.o] Error 1 I don't get very far at all. Did you remember to add -lsocket to LDFLAGS ? Dave **= Email 8 ==========================** Date: Tue, 16 Apr 2002 19:31:38 +0100 From: John Poltorak Subject: CDDB Server Has anyone tried building a CDDB server? It's available here:- ftp://ftp.freedb.org/pub/freedb/cddbd-1.4.tar.gz I tried but got a number of compile errors:- gcc -O -c inet.c inet.c: In function `get_rmt_hostname': inet.c:132: `socklen_t' undeclared (first use in this function) inet.c:132: (Each undeclared identifier is reported only once inet.c:132: for each function it appears in.) inet.c:132: parse error before `len' inet.c:136: `len' undeclared (first use in this function) inet.c:136: parse error before `sizeof' inet.c: In function `cddbd_stand': inet.c:419: `socklen_t' undeclared (first use in this function) inet.c:419: parse error before `len' inet.c:471: `len' undeclared (first use in this function) inet.c:471: parse error before `sizeof' make: *** [inet.o] Error 1 -- John **= Email 9 ==========================** Date: Tue, 16 Apr 2002 20:16:55 -0800 From: "Dave and Natalie" Subject: Re: CDDB Server On Tue, 16 Apr 2002 19:28:33 -0800, Dave and Natalie wrote: >On Tue, 16 Apr 2002 19:31:38 +0100, John Poltorak wrote: > >> >>Has anyone tried building a CDDB server? >> >>It's available here:- >> >>ftp://ftp.freedb.org/pub/freedb/cddbd-1.4.tar.gz >> >> >>I tried but got a number of compile errors:- >> >>gcc -O -c inet.c >>inet.c: In function `get_rmt_hostname': >>inet.c:132: `socklen_t' undeclared (first use in this function) This function isn't implemented in emx, maybe in posix/2? Dave