Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0009528 [DCSS] Bug Report major always 2015-03-09 06:31 2017-02-04 19:14
Reporter n1000 View Status public  
Assigned To neil
Priority normal Resolution done  
Status resolved   Product Branch 0.17 ancient branch
Summary 0009528: Error while building sqlite3 under Cygwin
Description |amethyst provided the attached patch to help with some initial issues with the compile. I have been running simply "make debug" which results in the following error:

    LINK crawl.exe
contrib/install/x86_64-pc-cygwin/lib/libsqlite3.a(sqlite3.o): In function `sqlite3ThreadProc':
/home/n1000/games/crawl/crawl/crawl-ref/source/contrib/sqlite/sqlite3.c:22125: undefined reference to `_endthreadex'
/home/n1000/games/crawl/crawl/crawl-ref/source/contrib/sqlite/sqlite3.c:22125:(.text+0x51cf): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_endthreadex'
contrib/install/x86_64-pc-cygwin/lib/libsqlite3.a(sqlite3.o): In function `sqlite3ThreadCreate':
/home/n1000/games/crawl/crawl/crawl-ref/source/contrib/sqlite/sqlite3.c:22147: undefined reference to `_beginthreadex'
/home/n1000/games/crawl/crawl/crawl-ref/source/contrib/sqlite/sqlite3.c:22147:(.text+0x5285): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_beginthreadex'
collect2: error: ld returned 1 exit status
Makefile:1508: recipe for target 'crawl.exe' failed
make: *** [crawl.exe] Error 1



Working with |amethyst we have so far tried modifying sqlite3.c in the following way:

<|amethyst> #if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP)
<|amethyst> # if SQLITE_OS_UNIX
<|amethyst> # define SQLITE_MUTEX_PTHREADS
<|amethyst> # elif SQLITE_OS_WIN
<|amethyst> # define SQLITE_MUTEX_W32
<|amethyst> change the if SQLITE_OS_UNIX to if SQLITE_OS_UNIX || defined(__CYGWIN__)


I will momentarily attempt to do a complete make clean, make.
Additional Information
Tags No tags attached.
Attached Files ? file icon 0001-Fix-Cygwin-builds-nonethousand.patch [^] (2,537 bytes) 2015-03-09 06:31 [Show Content]

- Relationships

-  Notes
(0028624)
nooodl (reporter)
2015-03-10 23:36

This is a Cygwin issue. Jan Nijtmans linked a corrected sqlite3.c in a mailing thread here: www.mail-archive.com/sqlite-users@sqlite.org/msg88301.html">https://www.mail-archive.com/sqlite-users@sqlite.org/msg88301.html [www.mail-archive.com/sqlite-users@sqlite.org/msg88301.html" target="_blank">^]

I seem to remember this fixing that for me a couple of months ago, at least (although I get different cygwin errors trying to compile Crawl itself...)
(0028625)
nooodl (reporter)
2015-03-10 23:36

This is a Cygwin issue. Jan Nijtmans linked a corrected sqlite3.c in a mailing thread here: www.mail-archive.com/sqlite-users@sqlite.org/msg88301.html">https://www.mail-archive.com/sqlite-users@sqlite.org/msg88301.html [www.mail-archive.com/sqlite-users@sqlite.org/msg88301.html" target="_blank">^]

I seem to remember this fixing that for me a couple of months ago, at least (although I get different cygwin errors trying to compile Crawl itself...)
(0028628)
n1000 (reporter)
2015-03-11 01:14

The combination of |amethyst's patch and replacing sqlite3.c with the file in nooodl's link has allowed me to successfully compile under Cygwin. Great work everyone :)
(0029646)
gammafunk (administrator)
2015-10-24 20:18

Downgrading severity to major. The fixes in |amethyst's patch were applied in 0.17-a0-1480-g2a75f53, but we still need to update our sqlite contrib, so I'm leaving this open.
(0031411)
Rast (reporter)
2017-01-13 17:15

Building crawl 0.20-a0-467-ge11a7c5 in cywin i experienced the same error. I swapped in the sqlite3.c nooodl links to, did "make clean" and then was able to build with no more errors.

Thanks nooodl.
(0031457)
neil (administrator)
2017-02-04 19:13

Fixed in trunk (0.20-a0-558-g437268c), thanks! You'll need to do "git submodule update" from the top-level to pull the newer sqlite3 code.

- Issue History
Date Modified Username Field Change
2015-03-09 06:31 n1000 New Issue
2015-03-09 06:31 n1000 File Added: 0001-Fix-Cygwin-builds-nonethousand.patch
2015-03-10 23:36 nooodl Note Added: 0028624
2015-03-10 23:36 nooodl Note Added: 0028625
2015-03-11 01:14 n1000 Note Added: 0028628
2015-10-24 20:15 gammafunk Severity block => major
2015-10-24 20:18 gammafunk Note Added: 0029646
2016-03-03 13:37 giann Issue Monitored: giann
2017-01-13 17:15 Rast Note Added: 0031411
2017-02-04 19:13 neil Note Added: 0031457
2017-02-04 19:13 neil Status new => resolved
2017-02-04 19:13 neil Fixed in Branch => 0.20 development branch
2017-02-04 19:13 neil Resolution open => done
2017-02-04 19:13 neil Assigned To => neil


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker