NetXMS Support Forum

English Support => General Support => Topic started by: possamai on January 28, 2014, 03:04:44 PM

Title: [PATCH] sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
Post by: possamai on January 28, 2014, 03:04:44 PM
Trying to build NetXMS-1.2.11 on FreeBSD 9.2 I'm runing into an error message..
I configured like this: ./configure --with-openssl --with-mysql --with-server --with-snmp --with-agent --prefix=/usr/local/netxms

Then when I try to 'make' it ends in error.
I have sqlite3 installed.

Quote
Making all in sqlite
  CC     libnxsqlite_la-sqlite3.lo
sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
*** [libnxsqlite_la-sqlite3.lo] Error code 1

I fixed it by adding #include <sys/stat.h> to netxms-1.2.11/src/sqlite/sqlite3.c
It's probably not the best place to put it but at least it works :)
Maybe it can be added to the next version so FreeBSD it can be compiled on FreeBSD without the need to google :P
Title: Re: [PATCH] sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
Post by: Victor Kirhenshtein on January 28, 2014, 07:19:18 PM
Can you please check that latest SQLite amalgamation (http://www.sqlite.org/2013/sqlite-amalgamation-3080200.zip (http://www.sqlite.org/2013/sqlite-amalgamation-3080200.zip)) compiles on FreeBSD 9.2? If yes, I'll just replace current version with latest one.

Best regards,
Victor
Title: Re: [PATCH] sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
Post by: possamai on January 29, 2014, 12:06:44 AM
I could..... but I'm not really sure how..
"gcc sqlite3.c shell.c -o sqlite" compiles without error but I'm not sure if that's how I'm suposed to compile it.
Title: Re: [PATCH] sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
Post by: Victor Kirhenshtein on January 29, 2014, 10:17:07 AM
Yes, it's what I was interested in. Thank you!

Best regards,
Victor
Title: Re: [PATCH] sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
Post by: possamai on January 29, 2014, 11:40:16 AM
you're welcome. 8)