Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#317 Fails to compile if sizeof(time_t) != sizeof(int)

closed-fixed
nobody
None
5
2004-07-15
2004-07-07
Benny Siegert
No

When trying to compile fluxbox 0.9.9 in MirOS, I get
the following error:

----

[...]
c++ -O2 -O2 -march=pentium -mcpu=athlon-xp
-mpreferred-stack-boundary=2 -fno-align-functions
-fno-strict-aliasing -fno-strength-reduce -fgcse
-fschedule-insns2 -fthread-jumps
-I/usr/ports/x11/fluxbox -I/usr/local/include
-I/usr/ports/x11/fluxbox -I/usr/local/include
-I/usr/X11R6/include -DSHAPE
-I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -o
fluxbox ArrowButton.o FbAtoms.o FbWinFrame.o
FbWinFrameTheme.o fluxbox.o I18n.o Keys.o main.o
Netizen.o RootTheme.o FbRootWindow.o Screen.o
ScreenResources.o Slit.o SlitTheme.o SlitClient.o
WinButton.o WinButtonTheme.o Window.o Workspace.o
FbCommands.o IntResMenuItem.o FbMenu.o WinClient.o
Xutil.o CurrentWindowCmd.o WorkspaceCmd.o
CommandParser.o FbCommandFactory.o Shape.o MenuTheme.o
Container.o TextTheme.o BorderTheme.o CommandDialog.o
SendToMenu.o Ewmh.o Gnome.o Remember.o RegExp.o
ClientPattern.o Toolbar.o ToolbarTheme.o ToolbarItem.o
ClockTool.o WorkspaceNameTool.o IconbarTool.o
IconbarTheme.o ToolTheme.o IconButton.o SystemTray.o
GenericTool.o ButtonTool.o ButtonTheme.o ToolFactory.o
-L/usr/local/lib -L/usr/X11R6/lib -lSM -lICE
FbTk/libFbTk.a -lX11 -lXext -lXft -lfreetype
-lfontconfig -lXrender -lXpm -lXrandr -lXinerama
Ewmh.o(.text+0xd89): In function
`Ewmh::updateWorkspaceNames(BScreen&)':
: warning: strcpy() is almost always misused, consider
using strlcpy()
/usr/X11R6/lib/libSM.so.7.0: warning: strcat() is
almost always misused, consider using strlcat()
fluxbox.o(.text+0x5a2): In function
`FbTk::Resource<int>::getString()':
: warning: sprintf() is often misused, please use
snprintf()
fluxbox.o(.gnu.linkonce.d._ZTVN4FbTk8ResourceIxEE+0x10):
undefined reference to `FbTk::Resource<long
long>::setFromString(char const*)'
fluxbox.o(.gnu.linkonce.d._ZTVN4FbTk8ResourceIxEE+0x18):
undefined reference to `FbTk::Resource<long
long>::getString()'
collect2: ld returned 1 exit status
*** Error code 1

Stop in
/usr/ports/x11/fluxbox/w-fluxbox-0.9.9/fluxbox-0.9.9/src
(line 1776 of Makefile).
*** Error code 1

Stop in
/usr/ports/x11/fluxbox/w-fluxbox-0.9.9/fluxbox-0.9.9/src
(line 1887 of Makefile).
*** Error code 1

Stop in
/usr/ports/x11/fluxbox/w-fluxbox-0.9.9/fluxbox-0.9.9/src
(line 1731 of Makefile).

----

The problem is that our time_t is 64-bits and int is
32-bits. FbTk::Resource::setFromString() has to be
implemented for each data type it is used for, but
fluxbox.cc only provides an implementation for int
types. Thus it fails here, where time_t == long long.

What's important here is: the next glibc release will
also feature this 64-bits time_t, so it is unlikely
that fluxbox will run there.

Discussion

  • Logged In: YES
    user_id=296419

    fixed in cvs

     
    • status: open --> closed-fixed