tagai doesn't build on openSuse 12.1

Bug #1015476 reported by lanig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tagaini Jisho
New
Undecided
Unassigned

Bug Description

Error message :

/usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld: ../../sqlite/libtagaini_sqlite.a(sqlite3.c.o): undefined reference to symbol 'pthread_mutex_trylock@@GLIBC_2.0'
/usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld: note: 'pthread_mutex_trylock@@GLIBC_2.0' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

It seems it fails to on opensuse openbuild system.

Best regards.

Alain

Revision history for this message
Gnurou (gnurou) wrote :

I think the following patch will do the trick. could you try it?

diff --git a/src/sqlite/CMakeLists.txt b/src/sqlite/CMakeLists.txt
index daeaf18..10b014c 100644
--- a/src/sqlite/CMakeLists.txt
+++ b/src/sqlite/CMakeLists.txt
@@ -1,6 +1,8 @@
 set(QT_DONT_USE_QTGUI TRUE)
 include(${QT_USE_FILE})

+find_package(Threads)
+
 set(SQLITE_MIN_VERSION "3007004")
 set(SQLITE_BLACKLIST "3007007;3007008")
 set(SQLITE_DOWNLOAD_VERSION "3071100")
@@ -86,10 +88,11 @@ add_definitions(-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_E

 if(SHARED_SQLITE_LIBRARY)
        add_library(tagaini_sqlite SHARED ${tagainijisho_sqlite_SRCS} ${tagainijisho_sqlite_MOC_SRCS})
- target_link_libraries(tagaini_sqlite ${QT_LIBRARIES} ${extra_link_flags})
+ target_link_libraries(tagaini_sqlite ${QT_LIBRARIES} ${extra_link_flags} ${CMAKE_THREAD_LIBS_INIT})
        install(TARGETS tagaini_sqlite BUNDLE DESTINATION . COMPONENT Runtime LIBRARY DESTINATION lib COMPONENT Runtime)
 else()
        add_library(tagaini_sqlite STATIC ${tagainijisho_sqlite_SRCS} ${tagainijisho_sqlite_MOC_SRCS})
+ target_link_libraries(tagaini_sqlite ${CMAKE_THREAD_LIBS_INIT})
 endif()
 if(NOT EMBED_SQLITE)
        target_link_libraries(tagaini_sqlite sqlite3)

If it does not work, please attach the full compilation log, with the "VERBOSE=1" environment variable declared so I can see what is exactly called.

Btw, we are not using launchpad anymore - future issues should be reported to https://github.com/Gnurou/tagainijisho/issues

Revision history for this message
lanig (alainbe) wrote : Re: [Bug 1015476] Re: tagai doesn't build on openSuse 12.1

Le 20/06/2012 15:38, Gnurou a écrit :
> I think the following patch will do the trick. could you try it?
Hi,
Thanks a lot for your answer.

Sorry, I am not very used to patch files, but :

  patch --dry-run -Np1 -d tagainijisho-0.9.4 < patchfile.patch
patching file src/sqlite/CMakeLists.txt
Hunk #2 FAILED at 88.
1 out of 2 hunks FAILED -- saving rejects to file
src/sqlite/CMakeLists.txt.rej

TIA,

Alain

Revision history for this message
Gnurou (gnurou) wrote :

There are just two lines to change with this patch - if it does not apply,
can you change them manually and see if build succeeds?
On Jun 21, 2012 2:05 AM, "lanig" <email address hidden> wrote:

> Le 20/06/2012 15:38, Gnurou a écrit :
> > I think the following patch will do the trick. could you try it?
> Hi,
> Thanks a lot for your answer.
>
> Sorry, I am not very used to patch files, but :
>
> patch --dry-run -Np1 -d tagainijisho-0.9.4 < patchfile.patch
> patching file src/sqlite/CMakeLists.txt
> Hunk #2 FAILED at 88.
> 1 out of 2 hunks FAILED -- saving rejects to file
> src/sqlite/CMakeLists.txt.rej
>
> TIA,
>
> Alain
>
> --
> You received this bug notification because you are subscribed to Tagaini
> Jisho.
> https://bugs.launchpad.net/bugs/1015476
>
> Title:
> tagai doesn't build on openSuse 12.1
>
> Status in Tagaini Jisho:
> New
>
> Bug description:
> Error message :
>
> /usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld:
> ../../sqlite/libtagaini_sqlite.a(sqlite3.c.o): undefined reference to
> symbol 'pthread_mutex_trylock@@GLIBC_2.0'
> /usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld:
> note: 'pthread_mutex_trylock@@GLIBC_2.0' is defined in DSO
> /lib/libpthread.so.0 so try adding it to the linker command line
> /lib/libpthread.so.0: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
>
> It seems it fails to on opensuse openbuild system.
>
> Best regards.
>
> Alain
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/tagaini-jisho/+bug/1015476/+subscriptions
>

Revision history for this message
lanig (alainbe) wrote :

Le 23/06/2012 17:20, Gnurou a écrit :
> There are just two lines to change with this patch - if it does not apply,
> can you change them manually and see if build succeeds?
That is what I have done. I have posted the output on github
(unfortunately, I closed the bug by error, but still could post comments
after. I have posted what seems to me as being the buidl logs).

Best regards,

Alain

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.