From wxwin-users-request Wed Jul 12 15:44:22 1995 Received: from arcturus.ciril.fr by aiai.ed.ac.uk; Wed, 12 Jul 95 15:44:12 BST Received: by arcturus.ciril.fr (1.37.109.16/16.2) id AA171260265; Wed, 12 Jul 1995 16:44:25 +0200 Date: Wed, 12 Jul 1995 16:44:25 +0200 From: Patrick Paroubek Message-Id: <199507121444.AA171260265@arcturus.ciril.fr> To: wxwin-bugs@aiai.ed.ac.uk Subject: open file pb solved deleting rx.o from libg++.a Status: REO wxWindow 1.62e HP-UX arcturus A.09.04 U 9000/887 gcc version 2.6.3 ---------------------------------------- pb: crash on file browser opening solved ---------------------------------------- JS> Looking at a message on the wxwin-users archive, Pascal Henry JS> reported the problem on the HP in May and said he'd JS> listened to the advice of users and extracted rx.o JS> from libg++.a, and put libg++ at the end of the include lib Extracting rx.o from ligb++.a SOLVED the open file problem ! Thanks. The culprit seemed to be rx_compile. test.pap (a copy of minimal) Program received signal SIGBUS, Bus error. 0xd5e94 in rx_compile (pattern=0x0, size=0, syntax=0, rxb=0x0) at rx.c:6120 rx.c:6120: No such file or directory. (gdb) ============================================ But in order to compile the main library without pbs, I had to "outline" (or un-inline ;-) some member functions. pb: --- ib: ar already did it for you, see ar(1). make -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='-O' LDLIBS='-lwx_motif -lXm -lXt -lX11 -lm -lg++ -lgcc ' WXLIB=../../lib/libwx_motif.a XVIEW_LINK= No suffix list. g++ -L/usr/lib/Motif1.2 -L/usr/lib/X11R5 -L../../lib -o colours_motif objects_motif/colours.o -lwx_motif -lXm -lXt -lX11 -lm -lg++ -lgcc /bin/ld: Unsatisfied symbols: ChangeColour__6wxItem (data) collect2: ld terminated with signal 10 , core dumped fix: ---- in src/x/wx_item.cc #ifdef wx_motif // added this pap July'95 void wxItem::ChangeColour (void) { } #endif pb: --- wx_ipc.cc: In method `int SafeSock::findMsg(char *&, char *&)': wx_ipc.cc:165: warning: can't inline call to `int SafeSock::findMsg(char *&, char *&)' wx_ipc.cc: At top level: wx_ipc.cc:466: warning: `class SockMgr' only defines a private destructor and has no friends wx_ipc.cc:466: warning: `class SockMgr' only defines private constructors and has no friends wx_ipc.cc: In method `SockMgr::~SockMgr()': wx_ipc.cc:402: warning: can't inline call to `int SockMgr::close(int)' wx_ipc.cc: In method `void SockMgr::addSock(int)': wx_ipc.cc:388: warning: can't inline call to `class SafeSock * SockMgr::getSock(int)' g++ -c -I/usr/in fix: ---- in src/x/wx_ipc.cc, moved up a few line the :public statement in SockMgr and "outlined" a few member functions /* pap July 95, "outlined" this one */ Bool findMsg(char * & start, char * & end); class SockMgr { static SockMgr * master; // A ptr to the sole SockMgr (or 0 if none). wxList socks; // A list of ptrs to SafeSock objects. // pap July '95 public: // pap July '95 // public: // Return a reference to the master socket manager, creating if necessary. static SockMgr & create(void) // "outlined" this one, pap , July 95 SafeSock * getSock(int fd); // "outlined" this one, pap July '95 int close(int fd); ============================================ Still unsolved pbs: IPC demo crashes (both client and server). pap - From pap@ciril.fr Wed Jul 12 16:44:19 1995 Received: from festival.ed.ac.uk (festival.edinburgh.ac.uk) by aiai.ed.ac.uk; Wed, 12 Jul 95 16:44:16 BST Received: from arcturus.ciril.fr by festival.ed.ac.uk id aa10925; 12 Jul 95 16:44 BST Received: by arcturus.ciril.fr (1.37.109.16/16.2) id AA211073837; Wed, 12 Jul 1995 17:43:57 +0200 Date: Wed, 12 Jul 1995 17:43:57 +0200 From: Patrick Paroubek Message-Id: <199507121543.AA211073837@arcturus.ciril.fr> To: J.Smart@ed.ac.uk In-Reply-To: <24704.9507121502@subnode.aiai.ed.ac.uk> (message from Julian Smart on Wed, 12 Jul 95 16:02:05 BST) Subject: Re: open file pb solved deleting rx.o from libg++.a Status: RO ------------------ wxWindow 1.62e HP-UX arcturus A.09.04 U 9000/887 gcc version 2.6.3 ------------------ to extract rx.o from libg++: ar d libg++.a rx.o Warning ! In case you created a copy of libg++.a, let say libwx_g++.a, whithout rx.o (cp libg++.a libwx_g++.a; ar d libwx_g++.a rx.o), but let the original version of lig++.a in place not to disturb other users of the library; be sure to call the compiler from your makefiles as "gcc", because "g++" is an alias which automatically generates a reference to libg++ (-lg++). Thus even if you would mention -lwx_g++ in you makefiles, your changes might seem not to be operative. With all my support for wxWindow. pap- From wxwin-users-request Wed Jul 12 16:34:41 1995 Received: from arcturus.ciril.fr by aiai.ed.ac.uk; Wed, 12 Jul 95 16:34:25 BST Received: by arcturus.ciril.fr (1.37.109.16/16.2) id AA203553282; Wed, 12 Jul 1995 17:34:42 +0200 Date: Wed, 12 Jul 1995 17:34:42 +0200 From: Patrick Paroubek Message-Id: <199507121534.AA203553282@arcturus.ciril.fr> To: wxwin-bugs@aiai.ed.ac.uk Subject: ipc demo pb solved Status: REO --------------------------------- wxWindow 1.62e HP-UX arcturus A.09.04 U 9000/887 gcc version 2.6.3 --------------------------------- The ipc demo bug was due to a faulty sscanf in libg++, a core was produced when converting the server port number from a string to an int. in wxServer::create // sscanf (server_name, "%d", &the_port); in wxClient::MakeConnection // sscanf (server_name, "%d", &port); Here follows a temporary workaround, passing directly the port number as an int. With this changes, the ipc demo worked fine. pap- ================= in include/x/wx_ipc.h class wxServer: public wxbServer { Bool Create(char *server_name); // Returns FALSE if can't create server (e.g. port // number is already in use) // pap July '95 Bool wxServer::Create (int server_name); class wxClient: public wxbClient { ... virtual wxConnection *MakeConnection(char *host, char *server, char *topic); // Call this to make a connection. // Returns NULL if cannot. // pap July '95 wxConnection *MakeConnection(char *host, int server, char *topic); ================ in x/src/wx_ipc.cc // pap July '95 Bool wxServer::Create (int server_name) { // pap // service_name = copystring (server_name); service_name = NULL; // Under UNIX, server should be an integer inside a string! int the_port = 0; // pap // sscanf (server_name, "%d", &the_port); the_port = server_name; // remaining part of the members function body left unchanged with respect // to Bool wxServer::Create (char* server_name) ... // pap july '95 // wxConnection *wxClient::MakeConnection (char *host, char *server_name, char *topic) wxConnection *wxClient::MakeConnection (char *host, int server_name, char *topic) { int port; // pap july '95 // sscanf (server_name, "%d", &port); port = server_name; union // remaining part of the members function body left unchanged with respect // to Bool wxConnection *wxClient::MakeConnection (char *host, char* server_name, char *topic) ===================== in samples/ipc/server.cc // pap my_server->Create( 4242 ); // my_server->Create(server_name); in samples/ipc/client.cc // pap Jyly '95 // the_connection = (MyConnection *)my_client->MakeConnection(host, server, "IPC TEST"); the_connection = (MyConnection *)my_client->MakeConnection(host, 4242, "IPC TEST"); ============================================= end of mail ================================