Ticket #73 (closed bugs: Invalid)

Opened 4 years ago

Last modified 39 years ago

Fl_lock.cpp

Reported by: nobody Owned by: nobody
Priority: 5 Milestone:
Component: Compiling Problems Version: eFLTK
Keywords: Cc:

Description

Compiling Fl_lock.cpp...
Fl_lock.cpp:92: error: parse error before `.' token
make[2]: *** [Fl_lock.shared.o] Error 1

in last version efltk-2.0.4.tar.bz2

Change History

Changed 4 years ago by vljubovic

Logged In: YES 
user_id=110776

Hello, 
Could you please provide info on your operating system and 
compiler you're using? Thanks. 

Changed 4 years ago by nobody

Logged In: NO 

kernel 2.6.11
gcc version 3.3.4
glibc 2.3.3
x11 6.8.2
distr crux 2.0

-----------------------------------------------------------------
./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether byte ordering is bigendian... no
checking for ranlib... ranlib
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for scandir... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for strcasecmp... yes
checking for vsprintf... yes
checking for strtok_r... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for XOpenDisplay in -lX11... yes
checking for Xutf8TextPropertyToTextList in -lX11... yes
checking for XdbeQueryExtension in -lXext... yes
checking for glXMakeCurrent in -lGL... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_set_sig_bytes in -lpng... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_stdio_src in -ljpeg... yes
checking X11/extensions/Xdbe.h usability... no
checking X11/extensions/Xdbe.h presence... yes
configure: WARNING: X11/extensions/Xdbe.h: present but cannot be 
compiled
configure: WARNING: X11/extensions/Xdbe.h: check for missing 
prerequisite headers?
configure: WARNING: X11/extensions/Xdbe.h: proceeding with the 
preprocessor's result
checking for X11/extensions/Xdbe.h... yes
checking "for X overlay visuals"... (cached) no
checking for math emulation... not needed
checking for dlopen in -lc... yes
checking whether NLS is requested... yes
checking for pthread_create in -lc... no
checking for pthread_create in -lpthread... yes
checking sql.h usability... no
checking sql.h presence... no
checking for sql.h... no
checking for mysql_config... no
No MySQL
checking for strip... /usr/bin/strip
configure: creating ./config.status
config.status: creating makeinclude
config.status: creating efltk-config
config.status: creating efltk.spec
config.status: creating config.h

Build information:
-------------------------
Prefix: /usr/local
Bin directory: /usr/local/bin
Lib directory: /usr/local/lib
Include directory: /usr/local/include

Debug/Optim flags: -Wuninitialized -O2

Thread libs: -lpthread
Png   libs:   -lpng -lz
Jpeg  libs:   -ljpeg
ODBC  libs:
MySQL libs:

-------------------------
EFLTK is ready for build.
To start building, type: ./emake
---------------------------------------------------------------------
make

Compiling Fl_lock.cpp...
Fl_lock.cpp:92: error: parse error before `.' token
make[2]: *** [Fl_lock.shared.o] Error 1
make[2]: Leaving directory `/usr/ports/test/efltk/work/src/efltk/src/core'
make[1]: *** [shared] Error 2
make[1]: Leaving directory `/usr/ports/test/efltk/work/src/efltk/src'
make: *** [all] Error 2

-------------------------------------------------------------------------------------
or if 
./configure  --disable-threads
make
make[2]: Entering directory `/usr/ports/test/efltk/work/src/efltk/tools/
efluid'
Compiling Fl_Function_Type.cpp...
Compiling Fl_Menu_Type.cpp...
Compiling Fl_Group_Type.cpp...
Compiling Fl_Widget_Type.cpp...
Compiling Fl_Type.cpp...
Compiling Fl_Window_Type.cpp...
Compiling Fluid_Image.cpp...
Compiling Fluid_Plugins.cpp...
Compiling code.cpp...
Compiling factory.cpp...
Compiling file.cpp...
Compiling fluid.cpp...
Compiling about_panel.cpp...
Compiling widget_panel.cpp...
Compiling alignment_panel.cpp...
Compiling function_panel.cpp...
Compiling coding_style.cpp...
Compiling coding_style_func.cpp...
Linking efluid...
g++ -o /usr/ports/test/efltk/work/src/efltk/bin/efluid Fl_Function_Type.o 
Fl_Menu_Type.o Fl_Group_Type.o Fl_Widget_Type.o Fl_Type.o 
Fl_Window_Type.o Fluid_Image.o Fluid_Plugins.o code.o factory.o file.o 
fluid.o about_panel.o widget_panel.o alignment_panel.o function_panel.o 
coding_style.o coding_style_func.o   /usr/ports/test/efltk/work/src/efltk/
lib/libefltk_images.so.2.0 -ljpeg -lpng -lz -L/usr/X11R6/lib /usr/ports/test/
efltk/work/src/efltk/lib/libefltk.so.2.0  -lX11 -lXext -lm
/usr/ports/test/efltk/work/src/efltk/lib/libefltk.so.2.0: undefined reference 
to `Fl_Mutex_attrib'
collect2: ld returned 1 exit status
make[2]: *** [efluid] Error 1
make[2]: Leaving directory `/usr/ports/test/efltk/work/src/efltk/tools/efluid'
make[1]: *** [programs] Error 2
make[1]: Leaving directory `/usr/ports/test/efltk/work/src/efltk/tools'
make: *** [all] Error 2



Changed 4 years ago by vljubovic

Logged In: YES 
user_id=110776

If you are using the latest efltk then your glibc seems to be 
broken. Line 92 of Fl_lock.cpp contains: 
 
static pthread_mutex_t fltk_mutex = 
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; 
 
There is no '.' here. The constant given above is defined in 
$includedir/pthread.h (usually $includedir="/usr/include") and 
should be like this: 
 
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ 
  {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 
__LOCK_INITIALIZER} 
 
PTHREAD_MUTEX_RECURSIVE_NP is enumerated, 
__LOCK_INITIALIZER on my system is 
in /usr/include/bits/initspin.h. Etc. I suggest that you verify if 
your installation is broken.  
 
As for your second problem (compiling efltk without threads) it 
seems that you didn't run make clean before compiling again, 
as efluid is trying to link against threaded lib. 

Changed 4 years ago by nobody

Logged In: NO 

today i update glibc 2.3.4 and gcc 3.4.3
and all compilation normal,  my glibc was broken.
thanks for help 
wbr, lbc.

Changed 4 years ago by vljubovic

  • status changed from assigned to closed
Note: See TracTickets for help on using tickets.