POV-Ray : Newsgroups : povray.bugreports : Solaris link problem (and fix) Server Time
31 Oct 2024 14:09:51 EDT (-0400)
  Solaris link problem (and fix) (Message 1 to 1 of 1)  
From: bugreports moderator
Subject: Solaris link problem (and fix)
Date: 14 Feb 2005 02:43:50
Message: <ugl011lbbalv4oq1q9in1rh157vm6i7j7n@4ax.com>
From: "Petesh" <Pet### [at] ntplxpovrayorg>
Date: Tue,  8 Feb 2005 13:40:26 EST

Hi,
I downloaded the latest source, and I needed to make one fix to allow
it to compile under the Sun One Studio 8 compilers:

The problem is:
CC  -O3   -L/usr/openwin/lib -R/usr/openwin/lib  -o povray  svga.o
unix.o xwin.o ../source/libpovray.a ../source/base/libbase.a
..../source/frontend/libfrontend.a ../libraries/png/libpng.a
..../libraries/tiff/libtiff/libtiff.a ../libraries/zlib/libz.a  -ljpeg
-lXpm -lsocket -lnsl -lSM -lICE -lX11 -lm
Undefined                       first referenced
 symbol                             in file
int UNIX_allow_file_write(const char*,unsigned)
..../source/libpovray.a(pov_util.o)
int UNIX_allow_file_read(const char*,unsigned)
..../source/libpovray.a(pov_util.o)
ld: fatal: Symbol referencing errors. No output written to povray

the solution is:

*** unix/unix.h.orig    Tue Feb  8 18:00:37 2005
--- unix/unix.h.new     Tue Feb  8 18:01:27 2005
***************
*** 59,66 ****
  void UNIX_abort_start   (void);
  void UNIX_abort_handler (int signum);

! int  UNIX_allow_file_write (const char *Filename, unsigned int
FileType);
! int  UNIX_allow_file_read  (const char *Filename, unsigned int
FileType);
  int  UNIX_system           (const char *string);

  void UNIX_startup_povray   (void);
--- 59,66 ----
  void UNIX_abort_start   (void);
  void UNIX_abort_handler (int signum);

! int  UNIX_allow_file_write (const char *Filename, const unsigned int
FileType);
! int  UNIX_allow_file_read  (const char *Filename, const unsigned int
FileType);
  int  UNIX_system           (const char *string);

  void UNIX_startup_povray   (void);


This is because the declaration in the .h file does not match the
intended
definition in the .cpp file. g++ does not care about the const
restriction.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.