These are issues I encountered when attempting to build Linux, OS X, and 
Windows builds from the code in trunk:


(1) BUILDING.txt needs to be modified to indicate that 
fltk-xfixes-xcursor-cmake.2.patch should be applied with patch -p0, not -p1.


(2) It would be much more convenient if BUILDING.txt contained full 
links to the patches, rather than links to the page from which they are 
downloaded.  That way, one could use wget to download them, which is a 
more streamlined workflow, since one is building from the command line.


(3) CMakeLists.txt in the FLTK build system needs to be patched as follows:

--- CMakeLists.txt      (revision 9619)
+++ CMakeLists.txt      (working copy)
@@ -167,6 +167,9 @@
  endif(LIB_png)
  CHECK_FUNCTION_EXISTS(png_get_valid          HAVE_PNG_GET_VALID)
  CHECK_FUNCTION_EXISTS(png_set_tRNS_to_alpha  HAVE_PNG_SET_TRNS_TO_ALPHA)
+if(LIB_png)
+   set(CMAKE_REQUIRED_LIBRARIES "")
+endif(LIB_png)

  CHECK_FUNCTION_EXISTS(scandir                HAVE_SCANDIR)
  CHECK_FUNCTION_EXISTS(snprintf               HAVE_SNPRINTF)


Otherwise, it will try to add -lpng to all of the subsequent function 
checks, which causes them to fail on some machines (including mine.)


(4) Fluid build fails on Mac using CMake unless CMakeLists.txt in the 
FLTK build system is patched as follows:

--- CMakeLists.txt      (revision 9619)
+++ CMakeLists.txt      (working copy)
@@ -51,7 +51,7 @@
     set(HAVE_STRTOLL 1)
     set(HAVE_STRCASECMP 1)
     set(HAVE_DIRENT_H 1)
-   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa")
+   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework 
Cocoa -framework Carbon")
  endif(APPLE)


NOTE:  this is the same thing configure.in is doing (linking both the 
Cocoa and Carbon frameworks, because Fl_cocoa.mm depends on some Carbon 
functions.)


(5) When building FLTK, one needs to manually specify 
-DCMAKE_BUILD_TYPE=Release if one wants optimized code.  Either the FLTK 
CMakeLists.txt needs to be modified to make CMAKE_BUILD_TYPE=Release the 
default, or it needs to be documented in TigerVNC's BUILDING.txt that 
adding this variable is necessary to produce optimized code.


(6) The TigerVNC build will fail unless I patch TigerVNC's 
CMakeLists.txt as follows:

--- CMakeLists.txt      (revision 5021)
+++ CMakeLists.txt      (working copy)
@@ -265,6 +265,7 @@
    if(X11_Xcursor_FOUND)
      set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xcursor_LIB})
    endif()
+  set(FLTK_LIBRARIES ${FLTK_LIBRARIES} png)
  endif()


This goes away when building FLTK with -DOPTION_USE_SYSTEM_LIBPNG=0, but 
distribution vendors will run into this problem, since they'll probably 
want to use the system libpng.  Since the patch above does no harm when 
using FLTK's internal PNG library, I would suggest going ahead and 
applying it to TigerVNC.


(7) Building FLTK using MinGW is problematic because of the dependency 
on the libgcc and libstdc++ DLL's.  These dependencies are automatically 
taken care of in the TigerVNC build system, but the FLTK build system 
doesn't have that same code.  It's particularly a problem with MinGW64, 
since those DLLs aren't in the PATH, and thus the build will actually 
fail because it's trying to run a test program that it just built.  It's 
problematic in general because, if FLTK depends on libgcc and libstdc++, 
so will the TigerVNC executable, which makes packaging it difficult. 
This was one reason why it was advantageous to build FLTK in the 
TigerVNC tree (it took on the build properties of the rest of the 
TigerVNC code.)  The only way I was able to hack around the issue was by 
copying the BUILD_STATIC code from the TigerVNC CMakeLists.txt file into 
the FLTK CMakeLists.txt file.  Yuck.


(8) You are using ImageMagick to generate tigervnc.png.  Of course 
ImageMagick is not available on Windows, so the Windows build fails.  I 
mean, seriously, check the PNG files into SVN.  They're all of, what, 2 
kilobytes?!

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to