Opened 14 years ago

Closed 14 years ago

#3210 closed defect (fixed)

Default nmake.opt fails to build with Visual C++

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: normal Milestone: 1.7.0
Component: ConfigBuild Version: svn-trunk
Severity: normal Keywords: msvc link jpeg
Cc:

Description

The default configuration provided in nmake.opt does not build out of the box on Windows (64-bit) using Visual C++ 9.0 (Visual Studio 2008). The linker can not find JPEG library symbols. AFAIU, this is an internal library, so looks like makefile.vc/nmake.opt configuration problem.

G:\dev\gdal\_svn\trunk\gdal>svn up
At revision 17961.

G:\dev\gdal\_svn\trunk\gdal>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86

G:\dev\gdal\_svn\trunk\gdal>nmake /f makefile.vc MSVC_VER=1500
        cd ..
        if exist gdal.lib del gdal.lib
        lib /nologo /out:gdal.lib port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib
ogrsf_frmts.lib(parsexsd.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
        link /nologo /dll /INCLUDE:_OGRFeatureStylePuller  /INCLUDE:_OSRValidate 
/INCLUDE:_OPTGetProjectionMethods  /INCLUDE:_OGR_G_GetPointCount  /INCLUDE:_OGRRegisterAll /INCLUDE:_GDALSimpleImageWarp@36  /INCLUDE:_GDALReprojectImage@48  /INCLUDE:_GDALComputeMedianCutPCT@32  /INCLUDE:_GDALDitherRGB2PCT@28  /INCLUDE:_OCTNewCoordinateTransformation@8
port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib        odbc32.lib odbccp32.lib user
32.lib                              gcore\Version.res  /out:gdal17dev.dll /implib:gdal_i.lib
   Creating library gdal_i.lib and object gdal_i.exp
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_abort_12 referenced in function _TIFFjpeg_error_exit
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_CreateCompress_12 referenced in function _TIFFjpeg_create_compress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_std_error_12 referenced in function _TIFFjpeg_create_compress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_CreateDecompress_12 referenced in function _TIFFjpeg_create_decompress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_set_defaults_12 referenced in function _TIFFjpeg_set_defaults
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_set_colorspace_12 referenced in function _TIFFjpeg_set_colorspace
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_set_quality_12 referenced in function _TIFFjpeg_set_quality
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_suppress_tables_12 referenced in function _TIFFjpeg_suppress_tables
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_start_compress_12 referenced in function _TIFFjpeg_start_compress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_write_scanlines_12 referenced in function _TIFFjpeg_write_scanlines
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_write_raw_data_12 referenced in function _TIFFjpeg_write_raw_data
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_finish_compress_12 referenced in function _TIFFjpeg_finish_compress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_write_tables_12 referenced in function _TIFFjpeg_write_tables
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_read_header_12 referenced in function _TIFFjpeg_read_header
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_start_decompress_12 referenced in function _TIFFjpeg_start_decompress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_read_scanlines_12 referenced in function _TIFFjpeg_read_scanlines
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_read_raw_data_12 referenced in function _TIFFjpeg_read_raw_data
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_finish_decompress_12 referenced in function _TIFFjpeg_finish_decompress
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_destroy_12 referenced in function _TIFFjpeg_destroy
tif_jpeg_12.obj : error LNK2019: unresolved external symbol _jpeg_resync_to_restart_12 referenced in function _TIFFjpeg_data_src
gdal17dev.dll : fatal error LNK1120: 20 unresolved externals
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.

Attachments (2)

gdal-trunk-r17975-checkout-build.log (224.6 KB ) - added by Mateusz Łoskot 14 years ago.
Large log of clean checkout and full build using namke /f makefile.vc MSVC_VER=1500 on Windows Vista 64-bit without any changes to nmake.opt file
libjpeg-rename-issue-ticket-3210.patch (5.4 KB ) - added by Mateusz Łoskot 14 years ago.
Patch replacing rename command with move command in gdal/frmts/jpeg/libjpeg12/makefile.vc for Visual C++

Download all attachments as: .zip

Change History (21)

comment:1 by warmerdam, 14 years ago

Keywords: jpeg added

Mateusz,

The jpeg_abort_12 function should be in gdal/frmts/jpeg/libjpeg12/jcomapi12.c (a #define maps jpeg_abort to jpeg_abort_12). On my 32bit build I see:

warmerda@gdal3200% nm jcomapi12.obj 
00000000 N .debug$F
00000000 N .debug$S
00000000 i .drectve
00000000 t .text
005f0c05 a @comp.id
00000001 a @feat.00
00000000 T _jpeg_abort_12
00000080 T _jpeg_alloc_huff_table_12
00000060 T _jpeg_alloc_quant_table_12
00000040 T _jpeg_destroy_12

I don't have Win64, so I can't really dig into this effectively. Can you look into why this function isn't getting around properly? I wonder if there is something special about function decoration on win64?

comment:2 by Mateusz Łoskot, 14 years ago

Frank,

First observation is that there is no such file as gdal/frmts/jpeg/libjpeg12/jcomapi12.c

Second, by default, NMAKE makefiles do not generate .obj files for gdal/frmts/jpeg/libjpeg12 but only for gdal/frmts/jpeg/libjpeg, here are relevant listings:

G:\dev\gdal\_svn\trunk\gdal\frmts\jpeg>svn info | grep Revision
Revision: 17975

G:\dev\gdal\_svn\trunk\gdal\frmts\jpeg>ls -1 libjpeg
README
jcapimin.c
jcapimin.obj
jcapistd.c
jcapistd.obj
jccoefct.c
jccoefct.obj
jccolor.c
jccolor.obj
jcdctmgr.c
jcdctmgr.obj
jchuff.c
jchuff.h
jchuff.obj
jcinit.c
jcinit.obj
jcmainct.c
jcmainct.obj
jcmarker.c
jcmarker.obj
jcmaster.c
jcmaster.obj
jcomapi.c
jcomapi.obj
jconfig.h
jcparam.c
jcparam.obj
jcphuff.c
jcphuff.obj
jcprepct.c
jcprepct.obj
jcsample.c
jcsample.obj
jctrans.c
jctrans.obj
jdapimin.c
jdapimin.obj
jdapistd.c
jdapistd.obj
jdatadst.c
jdatadst.obj
jdatasrc.c
jdatasrc.obj
jdcoefct.c
jdcoefct.obj
jdcolor.c
jdcolor.obj
jdct.h
jddctmgr.c
jddctmgr.obj
jdhuff.c
jdhuff.h
jdhuff.obj
jdinput.c
jdinput.obj
jdmainct.c
jdmainct.obj
jdmarker.c
jdmarker.obj
jdmaster.c
jdmaster.obj
jdmerge.c
jdmerge.obj
jdphuff.c
jdphuff.obj
jdpostct.c
jdpostct.obj
jdsample.c
jdsample.obj
jdtrans.c
jdtrans.obj
jerror.c
jerror.h
jerror.obj
jfdctflt.c
jfdctflt.obj
jfdctfst.c
jfdctfst.obj
jfdctint.c
jfdctint.obj
jidctflt.c
jidctflt.obj
jidctfst.c
jidctfst.obj
jidctint.c
jidctint.obj
jidctred.c
jidctred.obj
jinclude.h
jmemansi.c
jmemansi.obj
jmemmgr.c
jmemmgr.obj
jmemsys.h
jmorecfg.h
jpegint.h
jpeglib.h
jquant1.c
jquant1.obj
jquant2.c
jquant2.obj
jutils.c
jutils.obj
jversion.h
libjpeg.lib
makefile.vc

G:\dev\gdal\_svn\trunk\gdal\frmts\jpeg>ls -1 libjpeg12
jcapimin.c
jcapistd.c
jccoefct.c
jccolor.c
jcdctmgr.c
jchuff.c
jchuff.h
jcinit.c
jcmainct.c
jcmarker.c
jcmaster.c
jcomapi.c
jconfig.h
jcparam.c
jcphuff.c
jcprepct.c
jcsample.c
jctrans.c
jdapimin.c
jdapistd.c
jdatadst.c
jdatasrc.c
jdcoefct.c
jdcolor.c
jdct.h
jddctmgr.c
jdhuff.c
jdhuff.h
jdinput.c
jdmainct.c
jdmarker.c
jdmaster.c
jdmerge.c
jdphuff.c
jdpostct.c
jdsample.c
jdtrans.c
jerror.c
jerror.h
jfdctflt.c
jfdctfst.c
jfdctint.c
jidctflt.c
jidctfst.c
jidctint.c
jidctred.c
jinclude.h
jmemansi.c
jmemmgr.c
jmemsys.h
jmorecfg.h
jmorecfg.h.12
jpegint.h
jpeglib.h
jquant1.c
jquant2.c
jutils.c
jversion.h
makefile.vc

comment:3 by Even Rouault, 14 years ago

Mateusz,

something went wrong for you during the build process. frmts/jpeg/libjpeg12/makefile.vc should copy the C files from frmts/jpeg/libjpeg and rename them with a 12.c suffix. So instead of jcomapi.c, you should have a jcomapi12.c This is weird, as Tamas' buildbot 'szekerest-vc90x64-full', which has an environement similar to yours builds fine.

This operation of copy and rename is usually done when building the GTiff driver as it needs the 12 bit JPEG library. See http://buildbot.osgeo.org:8500/builders/szekerest-vc90x64-full/builds/107/steps/nmake/logs/stdio

comment:4 by Mateusz Łoskot, 14 years ago

Even,

Believe it or not, but rename command does not rename anything neither it gives any diagnostic messages:

        xcopy /Y ..\libjpeg\*.c
..\libjpeg\jcapimin.c
...
..\libjpeg\jutils.c
46 File(s) copied
        rename jcapimin.c jcapimin12.c
...
        rename jutils.c jutils12.c
        cl /nologo /MD /EHsc /Ox /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -I..\..\..\port -I..\..\..\ogr -I..\..\..\gcore  -I..\..\..
\alg -I..\..\..\ogr\ogrsf_frmts -DDEFAULT_MAX_MEM=500000000L -DOGR_ENABLED  /c jcapimin12.c
jcapimin12.c
c1 : fatal error C1083: Cannot open source file: 'jcapimin12.c': No such file or directory

I run as administrator on my system. Also, if I issue rename command manually, it works. It seems strange anyway.

by Mateusz Łoskot, 14 years ago

Large log of clean checkout and full build using namke /f makefile.vc MSVC_VER=1500 on Windows Vista 64-bit without any changes to nmake.opt file

comment:5 by Mateusz Łoskot, 14 years ago

Even,

As you can see in the large log attached (gdal-trunk-r17975-checkout-build.log), I do not perform any magic, just clean checkout and default build, rename commands are performed as expected, but no files are being renamed, so compilation fails.

by Mateusz Łoskot, 14 years ago

Patch replacing rename command with move command in gdal/frmts/jpeg/libjpeg12/makefile.vc for Visual C++

comment:6 by Mateusz Łoskot, 14 years ago

Initially, I thought it may be problem related to CR vs CRLF in makefile.vc, so I tried unix2dos on it, but it didn't help. However, using move command instead of rename command did help. Patch attached.

comment:7 by Mateusz Łoskot, 14 years ago

I'm still observing this problem (r18432). Any chance for anybody to test it to confirm?

G:\dev\gdal\_svn\trunk\gdal> nmake /f makefile.vc MSVC_VER=1500
...
G:\dev\gdal\_svn\trunk\gdal\frmts>cd jpeg   && nmake /nologo /f makefile.vc   && cd ..   || exit 1
        xcopy /D  /Y *.obj ..\o
0 File(s) copied
        cd libjpeg
        nmake /nologo /f makefile.vc
        lib /out:libjpeg.lib jcapimin.obj jcapistd.obj jccoefct.obj jccolor.obj jcdctmgr.obj jchuff.obj  jcinit.obj jcmainct.obj jcmarker.obj jcmaster.obj jcoma
pi.obj jcparam.obj  jcphuff.obj jcprepct.obj jcsample.obj jctrans.obj jdapimin.obj jdapistd.obj  jdatadst.obj jdatasrc.obj jdcoefct.obj jdcolor.obj jddctmgr.obj
 jdhuff.obj  jdinput.obj jdmainct.obj jdmarker.obj jdmaster.obj jdmerge.obj jdphuff.obj  jdpostct.obj jdsample.obj jdtrans.obj jerror.obj jfdctflt.obj jfdctfst.
obj  jfdctint.obj jidctflt.obj jidctfst.obj jidctint.obj jidctred.obj jquant1.obj  jquant2.obj jutils.obj jmemmgr.obj jmemansi.obj
Microsoft (R) Library Manager Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        xcopy /D  /Y *.obj ..\..\o
0 File(s) copied
        cd ..
        cd libjpeg12
        nmake /nologo /f makefile.vc
        xcopy /Y ..\libjpeg\*.h
..\libjpeg\jchuff.h
..\libjpeg\jconfig.h
..\libjpeg\jdct.h
..\libjpeg\jdhuff.h
..\libjpeg\jerror.h
..\libjpeg\jinclude.h
..\libjpeg\jmemsys.h
..\libjpeg\jmorecfg.h
..\libjpeg\jpegint.h
..\libjpeg\jpeglib.h
..\libjpeg\jversion.h
11 File(s) copied
        xcopy /Y jmorecfg.h.12 jmorecfg.h
G:jmorecfg.h.12
1 File(s) copied
        xcopy /Y ..\libjpeg\*.c
..\libjpeg\jcapimin.c
..\libjpeg\jcapistd.c
..\libjpeg\jccoefct.c
..\libjpeg\jccolor.c
..\libjpeg\jcdctmgr.c
..\libjpeg\jchuff.c
..\libjpeg\jcinit.c
..\libjpeg\jcmainct.c
..\libjpeg\jcmarker.c
..\libjpeg\jcmaster.c
..\libjpeg\jcomapi.c
..\libjpeg\jcparam.c
..\libjpeg\jcphuff.c
..\libjpeg\jcprepct.c
..\libjpeg\jcsample.c
..\libjpeg\jctrans.c
..\libjpeg\jdapimin.c
..\libjpeg\jdapistd.c
..\libjpeg\jdatadst.c
..\libjpeg\jdatasrc.c
..\libjpeg\jdcoefct.c
..\libjpeg\jdcolor.c
..\libjpeg\jddctmgr.c
..\libjpeg\jdhuff.c
..\libjpeg\jdinput.c
..\libjpeg\jdmainct.c
..\libjpeg\jdmarker.c
..\libjpeg\jdmaster.c
..\libjpeg\jdmerge.c
..\libjpeg\jdphuff.c
..\libjpeg\jdpostct.c
..\libjpeg\jdsample.c
..\libjpeg\jdtrans.c
..\libjpeg\jerror.c
..\libjpeg\jfdctflt.c
..\libjpeg\jfdctfst.c
..\libjpeg\jfdctint.c
..\libjpeg\jidctflt.c
..\libjpeg\jidctfst.c
..\libjpeg\jidctint.c
..\libjpeg\jidctred.c
..\libjpeg\jmemansi.c
..\libjpeg\jmemmgr.c
..\libjpeg\jquant1.c
..\libjpeg\jquant2.c
..\libjpeg\jutils.c
46 File(s) copied
        rename jcapimin.c jcapimin12.c
        rename jcapistd.c jcapistd12.c
        rename jccoefct.c jccoefct12.c
        rename jccolor.c jccolor12.c
        rename jcdctmgr.c jcdctmgr12.c
        rename jchuff.c jchuff12.c
        rename jcinit.c jcinit12.c
        rename jcmainct.c jcmainct12.c
        rename jcmarker.c jcmarker12.c
        rename jcmaster.c jcmaster12.c
        rename jcomapi.c jcomapi12.c
        rename jcparam.c jcparam12.c
        rename jcphuff.c jcphuff12.c
        rename jcprepct.c jcprepct12.c
        rename jcsample.c jcsample12.c
        rename jctrans.c jctrans12.c
        rename jdapimin.c jdapimin12.c
        rename jdapistd.c jdapistd12.c
        rename jdatadst.c jdatadst12.c
        rename jdatasrc.c jdatasrc12.c
        rename jdcoefct.c jdcoefct12.c
        rename jdcolor.c jdcolor12.c
        rename jddctmgr.c jddctmgr12.c
        rename jdhuff.c jdhuff12.c
        rename jdinput.c jdinput12.c
        rename jdmainct.c jdmainct12.c
        rename jdmarker.c jdmarker12.c
        rename jdmaster.c jdmaster12.c
        rename jdmerge.c jdmerge12.c
        rename jdphuff.c jdphuff12.c
        rename jdpostct.c jdpostct12.c
        rename jdsample.c jdsample12.c
        rename jdtrans.c jdtrans12.c
        rename jerror.c jerror12.c
        rename jfdctflt.c jfdctflt12.c
        rename jfdctfst.c jfdctfst12.c
        rename jfdctint.c jfdctint12.c
        rename jidctflt.c jidctflt12.c
        rename jidctfst.c jidctfst12.c
        rename jidctint.c jidctint12.c
        rename jidctred.c jidctred12.c
        rename jmemansi.c jmemansi12.c
        rename jmemmgr.c jmemmgr12.c
        rename jquant1.c jquant112.c
        rename jquant2.c jquant212.c
        rename jutils.c jutils12.c
        cl /nologo /MD /EHsc /Ox /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -I..\..\..\port -I..\..\..\ogr -I..\..\..\gcore  -I..\..\..
\alg -I..\..\..\ogr\ogrsf_frmts -DDEFAULT_MAX_MEM=500000000L -DOGR_ENABLED  /c jcapimin12.c
jcapimin12.c
c1 : fatal error C1083: Cannot open source file: 'jcapimin12.c': No such file or directory

The libjpeg files are not renamed (with suffix 12) in spite of the commands issued above:

G:\dev\gdal\_svn\trunk\gdal>dir frmts\jpeg\libjpeg12\*.c
 Volume in drive G is mloskot
 Volume Serial Number is 7EC6-68DD

 Directory of G:\dev\gdal\_svn\trunk\gdal\frmts\jpeg\libjpeg12

10/11/2009  10:51             9,401 jcapimin.c
10/11/2009  10:51             6,042 jcapistd.c
10/11/2009  10:51            16,849 jccoefct.c
10/11/2009  10:51            15,307 jccolor.c
10/11/2009  10:51            12,856 jcdctmgr.c
10/11/2009  10:51            29,237 jchuff.c
10/11/2009  10:51             2,421 jcinit.c
10/11/2009  10:51             9,508 jcmainct.c
10/11/2009  10:51            17,909 jcmarker.c
10/11/2009  10:51            20,479 jcmaster.c
10/11/2009  10:51             3,216 jcomapi.c
10/11/2009  10:51            26,157 jcparam.c
10/11/2009  10:51            25,948 jcphuff.c
10/11/2009  10:51            12,427 jcprepct.c
10/11/2009  10:51            19,378 jcsample.c
10/11/2009  10:51            14,365 jctrans.c
10/11/2009  10:51            13,032 jdapimin.c
10/11/2009  10:51             9,623 jdapistd.c
10/11/2009  10:51             5,270 jdatadst.c
10/11/2009  10:51             7,816 jdatasrc.c
10/11/2009  10:51            25,891 jdcoefct.c
10/11/2009  10:51            13,358 jdcolor.c
10/11/2009  10:51             8,562 jddctmgr.c
10/11/2009  10:51            21,768 jdhuff.c
10/11/2009  10:51            13,881 jdinput.c
10/11/2009  10:51            20,949 jdmainct.c
10/11/2009  10:51            42,478 jdmarker.c
10/11/2009  10:51            20,267 jdmaster.c
10/11/2009  10:51            14,316 jdmerge.c
10/11/2009  10:51            21,227 jdphuff.c
10/11/2009  10:51            10,013 jdpostct.c
10/11/2009  10:51            16,859 jdsample.c
10/11/2009  10:51             5,233 jdtrans.c
10/11/2009  10:51             8,147 jerror.c
10/11/2009  10:51             5,654 jfdctflt.c
10/11/2009  10:51             7,802 jfdctfst.c
10/11/2009  10:51            11,349 jfdctint.c
10/11/2009  10:51             8,693 jidctflt.c
10/11/2009  10:51            13,538 jidctfst.c
10/11/2009  10:51            15,204 jidctint.c
10/11/2009  10:51            13,926 jidctred.c
10/11/2009  10:51             4,777 jmemansi.c
10/11/2009  10:51            42,106 jmemmgr.c
10/11/2009  10:51            32,150 jquant1.c
10/11/2009  10:51            49,739 jquant2.c
10/11/2009  10:51             5,419 jutils.c
              46 File(s)        730,547 bytes
               0 Dir(s)  75,082,350,592 bytes free

G:\dev\gdal\_svn\trunk\gdal>
  • OS: Windows Vista 64-bit
  • Compiler: Visual C++ 9.0

comment:8 by Mateusz Łoskot, 14 years ago

Finally, I found out what's the problem. It is my environment issue. Simply, I didn't notice I have Cygwin with its rename.exe program installed on my machine and configured in PATH by default. (I do not use Cygwin, so didn't notice it).

The Cygwin rename.exe clearly has some issues with being called from makefile. It may cause problems to other users who have Cygwin installed as well. So, I would suggest to fix makefile.vc files either replacing rename command with ren or wrapping the whole command line with double quotes:

"rename jcapimin.c jcapimin12.c"

This will work regardless of presence of Cygwin rename.exe program.

comment:9 by warmerdam, 14 years ago

Resolution: wontfix
Status: newclosed

Mateusz,

Thanks for tracing this down. I find it hard to imagine this would be a common problem, so I am not inclined to make any changes to the build though if you wanted to change rename to ren I suppose that would be ok.

comment:10 by Even Rouault, 14 years ago

Milestone: 1.7.0

r18448 /trunk/gdal/frmts/jpeg/libjpeg12/makefile.vc: Use ren instead of rename to fix build with MSVC under Cygwin shell that seems to be broken in some setups (#3210)

comment:11 by Mateusz Łoskot, 14 years ago

Frank,

As I said, I do not use Cygwin. I have no idea really what Cygwin configuration means. I got it installed out of the box and have never changed or touched it.

On the other hand, what misconfiguration it could be I can't really imagine. The only that comes to my mind is that Cygwin is permanently added to my PATH, so I do not have to explicitly launch Cygwin shell to get its programs available. Perhaps that's an uncommon setup.

Anyway, if you are thrilled indeed about changing rename to ren, no problem for me, let's leave rename.

comment:12 by Even Rouault, 14 years ago

I finally backed out previous commit, so the current state is : unchanged

r18464 /trunk/gdal/frmts/jpeg/libjpeg12/makefile.vc: Revert r18448 to use again rename : why ? well, no idea really apart that users reported that 'ren' broke build for them and reverting to 'rename' helped ... (#3210)

comment:13 by Mateusz Łoskot, 14 years ago

FYI, I removed Cygwin bin location from my PATH environment variable and the problem has disappeared and NMAKE successfully builds GDAL now.

comment:14 by Mateusz Łoskot, 14 years ago

I'm really curious, what kind of issues users reported. I reported ticket with very detailed explanation, diagnosis and resolution. Anonymous users just reported broken build and proposed fixes are not accepted. Sounds a bit unfair, doesn't it?

Give it a second thought and be rational, please. ren is a valid alias on all Windows systems (including Windows CE). If it does not work for someone, then his environment is broken, for sure.

comment:15 by Even Rouault, 14 years ago

Mateusz, really I don't know why ren didn't work for a few people. Maybe they have a ren.exe somewhere in the path, just as you have a rename.exe in yours.... So what is a valid environment, what is a broken environment... I'm no longer enthusiastic enough to commit myself things whose consequences are rather fuzzy for me.

AFAIK, "anonymous users" included Martin Landa, which is now a GDAL commiter. Now that trunk is tagged 1.8.0dev, you could probably try commiting a better solution and see what happens.

comment:16 by Mateusz Łoskot, 14 years ago

Facts are:

  1. Both commands, ren and rename (no .exe extension) are valid native Windows commands to rename file(s)
  1. There is no such command as ren in native Linux (probably any Unix) environment to rename files, but uses rm comand.
  1. IMO, conclusion from 1 and 2 is as follows: ren is most unique of all the options and is native to Windows environment
  1. Cygwin or GnuWin32 ports of Unix tools may bring rename.exe and in that case it's user's responsibility to deal with it. Same case for ren.exe which still seems to be egsotic and hardly seen.
  1. In case MinGW brings ren.exe which does alias native ren in Windows, it is user's problem and user should deal with it.

I reported and investigated the problem about rename.exe and suggested ren would solve the problem for all. I somebody reports ren does cause problems, what let me emphasize I doubt, then it at least deserves some details about environment from such person. Something is working in different order here, don't you think so?

Yes, I am stubborn but I don't like double standards.

comment:17 by Mateusz Łoskot, 14 years ago

Resolution: wontfix
Status: closedreopened

comment:18 by Mateusz Łoskot, 14 years ago

Fixed in trunk with native Windows command ren (r18611)

comment:19 by Mateusz Łoskot, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.