View Issue Details

IDProjectCategoryView StatusLast Update
0009322ScribusBuild Systempublic2010-09-20 21:46
Reportercoder.tuxfamily Assigned Tocbradney  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSFreeBSDOS Version8.1
Product Version1.3.8 
Fixed in Version1.3.9.svn 
Summary0009322: compilation fails (libdl && locale_t)
DescriptionLike the 9131 (http://bugs.scribus.net/view.php?id=9131) and 9310 (http://bugs.scribus.net/view.php?id=9310) Report, on FreeBSD we don't have locale_t and libdl.

So the same solutions is possible :

FOR locale_t

in scribus/scclocale.h and scribus/scclocale.cpp

change #if defined(Q_OS_SOLARIS) || defined (Q_OS_OPENBSD)
by #if defined(Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined (Q_OS_FREEBSD)

(and maybe also || defined (Q_OS_NETBSD) )


FOR libdl

the same change : Add FreeBSD in the conditions. But doesn't seems works with me :

CMakeFiles/scribus.dir/util.cpp.o(.text+0x2c27): In function `printBacktrace(int)':
: undefined reference to `backtrace'
CMakeFiles/scribus.dir/util.cpp.o(.text+0x2c39): In function `printBacktrace(int)':
: undefined reference to `backtrace_symbols'
*** Error code 1
Steps To ReproduceHave a FreeBSD

Then compile scribus 1.3.8 after all required ports are installed.
TagsNo tags attached.
Patch

Activities

coder.tuxfamily

2010-08-17 06:52

reporter   ~0024487

I think i've found the problem.

Backtrace on GNU/Linux is with glibc. On *BSD we have libexecinfo (the port is needed). So you can compile with this modified scribus/CMakeLists.txt :

# required to resolve symbols from libdl when ld is called with --no-add-needed
IF(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
  TARGET_LINK_LIBRARIES(${EXE_NAME} dl)
ENDIF(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")

IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
  TARGET_LINK_LIBRARIES(${EXE_NAME} util execinfo)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")


I think, you can add the other *BSD (and maybe Solaris ?)

cbradney

2010-08-17 19:18

administrator   ~0024493

Can you please try with revision 15420 of Scribus 1.3.9svn or 1.5.0svn?

coder.tuxfamily

2010-08-18 05:24

reporter   ~0024496

I don't know why (maybe a problem with character) but i need to rewrite on line 24 the same code as you. If not the compiler say there is a problem with '(' on line 24,63.... After rewrite the same code, thats works... Strange...

And for the scribus/CMakeLists, we need "execinfo" :
IF(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
  TARGET_LINK_LIBRARIES(${EXE_NAME} util execinfo)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBS

coder.tuxfamily

2010-08-19 04:54

reporter  

coder.tuxfamily

2010-08-19 05:01

reporter   ~0024503

I have make some corrections of the problems. With this patch i have successfuly compile and launch Scribus 1.3.8. (and that's works also for 1.5.0svn, i need to make more test)

Change :

Change in scribus/scclocale.h && scribus/scclocale.cpp (Add FreeBSD on some conditions)
Change in scribus/CMakeLists.txt (add "execinfo" for libdl ; rewrite a condition for lauching plugin ( solve http://bugs.scribus.net/view.php?id=6897 problem for FreeBSD).
Change in scribus/plugins/scriptplugin/objprinter.cpp (add <iostream> else we have compile error).


Thanks

cbradney

2010-08-19 18:08

administrator   ~0024506

All committed

coder.tuxfamily

2010-08-25 05:07

reporter   ~0024527

There is still an error on scclocale.h

Find this blocks :

#if defined(Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined(Q_OS_FREEBSD)
#include <locale.h>
#endif

#if defined(Q_WS_WIN)
#define XLocaleType _locale_t
#else
  #if defined (Q_OS_SOLARIS) || defined (Q_OS_OPENBSD)
  #define XLocaleType char* //dummy?
  #else
  #define XLocaleType locale_t
  #endif
#endif



And change
#if defined (Q_OS_SOLARIS) || defined (Q_OS_OPENBSD)

by

#if defined (Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) [[ defined(Q_OS_FREEBSD)


Thank you for your great and quick works

cbradney

2010-08-26 19:01

administrator   ~0024534

It was ok in 1.3.9svn, but 1.5.0svn was missing this. I have fixed it now.

Issue History

Date Modified Username Field Change
2010-08-16 21:37 coder.tuxfamily New Issue
2010-08-16 22:32 christoph_s Assigned To => cbradney
2010-08-16 22:32 christoph_s Status new => assigned
2010-08-17 06:52 coder.tuxfamily Note Added: 0024487
2010-08-17 19:18 cbradney Note Added: 0024493
2010-08-17 19:18 cbradney Status assigned => resolved
2010-08-17 19:18 cbradney Fixed in Version => 1.3.9.svn
2010-08-17 19:18 cbradney Resolution open => fixed
2010-08-18 05:24 coder.tuxfamily Note Added: 0024496
2010-08-19 04:54 coder.tuxfamily File Added: Patch_FreeBSD_Scribus.tar.gz
2010-08-19 05:01 coder.tuxfamily Note Added: 0024503
2010-08-19 18:08 cbradney Note Added: 0024506
2010-08-19 20:01 cbradney Status resolved => closed
2010-08-25 05:07 coder.tuxfamily Note Added: 0024527
2010-08-25 05:07 coder.tuxfamily Status closed => feedback
2010-08-25 05:07 coder.tuxfamily Resolution fixed => reopened
2010-08-26 19:01 cbradney Note Added: 0024534
2010-08-26 19:01 cbradney Status feedback => resolved
2010-08-26 19:01 cbradney Resolution reopened => fixed
2010-09-20 21:46 cbradney Status resolved => closed