Ubuntu 9.10 x86

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Ubuntu 9.10 x86

Martin Kielhorn
I compiled revision 3054 on a freshly installed Ubuntu 9.10 x86.

There were some changes that I had to make in the source (and in one header of my system).

After doing all this I was able to start Micromanager.
However I haven't tested it on real hardware yet as the new Motherboard lacks RS-232.

I tried to use all dependencies from the Ubuntu package system.  So I
installed the Ubuntu imagej [note: I ran into problems when I upgraded
this imagej as root from 1.43b to 1.43g with Help->Upgrade
ImageJ... . The error looked like this:

martin@cyberpower:~/mm1005/micromanager1.3/mmstudio$ make
test -d build || mkdir build
rm -rf build/*
cp ./bin/plugins_mmstudio.config build/plugins.config
javac -source 1.5 -target 1.5 -sourcepath ../MMCoreJ_wrap:./src:../hcs/src:. -classpath /usr/share/imagej/../java/ij.jar:/usr/share/java/bsh.jar:/usr/share/java/swingx.jar:/bin/MMCoreJ.jar:. ./src/*.java ./src/org/micromanager/utils/AutofocusBase.java -d build
./src/org/micromanager/image5d/Image5D.java:1357: cannot find symbol
symbol  : class Resizer
location: package ij.plugin.filter
       PlugInFilter crop = new ij.plugin.filter.Resizer();
                                               ^
Note: ./src/org/micromanager/utils/GUIUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [MMJ_.jar] Error 1

sudo apt-get remove imagej; sudo apt-get install imagej
resolved the problem.]

I also installed the Ubuntu packages for beanshell and swingx. I had to set the links into the
imagej plugin directory like this:
ln -s /usr/share/java/swingx.jar /usr/share/imagej/plugins

first problem:

some file didn't compile because of

error: ‘snprintf’ was not declared in this scope
[I installed the manpages and looked what header is missing.
sudo apt-get install manpages-dev
man snprintf
-> turns out you need stdio.h]

second problem:

martin@cyberpower:~/mm1005/micromanager1.3/MMCore$ g++ -DPACKAGE_NAME=\"Micro-Manager\" -DPACKAGE_TARNAME=\"micro-manager\" -DPACKAGE_VERSION=\"1.3.0\" -DPACKAGE_STRI
NG=\"Micro-Manager\ 1.3.0\" -DPACKAGE_BUGREPORT=\"[hidden email]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"micro-manager\" -DVERSION=\"1.3.0\" -DSTDC_HEADERS=1 -DHAVE_
SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DH
AVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DSTDC_HEADERS=1 -DHAVE_MEMSET=1 -I.     -g -O -MT MMCore.o -MD
 -MP -MF .deps/MMCore.Tpo -c -o MMCore.o MMCore.cpp -Wall -W -Wextra
In file included from MMCore.cpp:70:
CircularBuffer.h:36: warning: ignoring #pragma warning
In file included from /usr/include/ace/OS_NS_dirent.h:149,
                 from /usr/include/ace/OS.h:32,
                 from MMCore.cpp:50:
/usr/include/ace/OS_NS_dirent.inl: In function ‘int ACE_OS::scandir(const ACE_TCHAR*, dirent***, int (*)(const dirent*), int (*)(const dirent**, const dirent**))’:
/usr/include/ace/OS_NS_dirent.inl:131: error: invalid conversion from ‘int (*)(const void*, const void*)’ to ‘int (*)(const dirent**, const dirent**)’
/usr/include/ace/OS_NS_dirent.inl:131: error:   initializing argument 4 of ‘int scandir(const char*, dirent***, int (*)(const dirent*), int (*)(const dirent**, const
dirent**))’
/usr/include/ace/OS_NS_dirent.inl: In function ‘int ACE_OS::alphasort(const void*, const void*)’:
/usr/include/ace/OS_NS_dirent.inl:152: error: invalid conversion from ‘const void*’ to ‘const dirent**’
/usr/include/ace/OS_NS_dirent.inl:152: error:   initializing argument 1 of ‘int alphasort(const dirent**, const dirent**)’
/usr/include/ace/OS_NS_dirent.inl:152: error: invalid conversion from ‘const void*’ to ‘const dirent**’
/usr/include/ace/OS_NS_dirent.inl:152: error:   initializing argument 2 of ‘int alphasort(const dirent**, const dirent**)’
In file included from MMCore.cpp:64:
../MMDevice/ImageMetadata.h: At global scope:
../MMDevice/ImageMetadata.h:92: warning: type qualifiers ignored on function return type

to fix this error I commented the line
//#define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR
in /usr/include/ace/config.h


third error:
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Arduino
Arduino.cpp: In member function ‘virtual int CArduinoSwitch::Initialize()’:
Arduino.cpp:296: error: ‘snprintf’ was not declared in this scope

[add
#include <stdio.h>
at the top of the Arduino.cpp]

4th error:
can't find sprintf
add stdio.h to
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ASIFW1000/ASIFW1000.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ASIFW1000/ASIFW1000Hub.cpp
sscanf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ASIStage/ASIStage.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/DemoCamera/DemoCamera.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/DemoRGBCamera/DemoRGBCamera.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/DemoStreamingCamera/DemoStreamingCamera.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/SerialManagerUNIX/SerialManager.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/SerialManagerUNIX/SerialPort.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/LeicaDMI/LeicaDMIScopeInterface.cpp
sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/LeicaDMR/LeicaDMR.cpp

#ifdef WIN32
   //#include <windows.h>
   #define snprintf _snprintf
#endif

snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Ludl/Ludl.cpp

snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/LudlLow/Ludl.cpp

snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Prior/Prior.cpp

sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Pecon/Pecon.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ZeissCAN/ZeissCAN.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ZeissCAN29/ZeissCAN29.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Conix/Conix.cpp
printf sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/NikonTE2000/NikonTE2000.cpp
sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/NikonTE2000/TEHub.cpp
snprintf printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/K8055/K8055.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/K8055/K8055Interface.cpp
snprintf printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/K8061/K8061.cpp

that is a lot of work. i just add stdio.h everywhere!

cd /home/martin/mm1005/micromanager1.3/DeviceAdapters
for i in `find .|grep \\.cpp$`
do
  echo "#include <stdio.h>" > /dev/shm/o
  cat $i >> /dev/shm/o
  cp /dev/shm/o $i
done



/home/martin/mm1005/micromanager1.3/DeviceAdapters/SpectralLMM5/SpectralLMM5.h:64: error: ‘uint16_t’ was not declared in this scope
-> add #include <stdint.h> to that file


so now everything is compiled



when I try to start Micromanager studio from within the imagej plugin menu I get
java.lang.UnsatisfiedLinkError: no MMCoreJ_wrap in java.library.path
and the hardwaredetection doesn't work

use
sudo update-alternatives --config java
to switch to java-6-sun

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/micro-manager/
martin@cyberpower:/usr/share/imagej$ java -jar ij.jar

--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Karl Bellve-3

I have sent a patch about including <stdio.h> back in July on some of the files due to the changes in GCC on newer linux distributions.

Looking at that patch, it only corrected SpectralLMM5,ASIFW1000, HubASIFW1000, and SerialPort.


On 10/06/2009 07:44 AM, Martin Kielhorn wrote:
I compiled revision 3054 on a freshly installed Ubuntu 9.10 x86.

There were some changes that I had to make in the source (and in one header of my system).

After doing all this I was able to start Micromanager.
However I haven't tested it on real hardware yet as the new Motherboard lacks RS-232.

I tried to use all dependencies from the Ubuntu package system.  So I
installed the Ubuntu imagej [note: I ran into problems when I upgraded
this imagej as root from 1.43b to 1.43g with Help->Upgrade
ImageJ... . The error looked like this:

[hidden email] make
test -d build || mkdir build
rm -rf build/*
cp ./bin/plugins_mmstudio.config build/plugins.config
javac -source 1.5 -target 1.5 -sourcepath ../MMCoreJ_wrap:./src:../hcs/src:. -classpath /usr/share/imagej/../java/ij.jar:/usr/share/java/bsh.jar:/usr/share/java/swingx.jar:/bin/MMCoreJ.jar:. ./src/*.java ./src/org/micromanager/utils/AutofocusBase.java -d build
./src/org/micromanager/image5d/Image5D.java:1357: cannot find symbol
symbol  : class Resizer
location: package ij.plugin.filter
       PlugInFilter crop = new ij.plugin.filter.Resizer();
                                               ^
Note: ./src/org/micromanager/utils/GUIUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [MMJ_.jar] Error 1

sudo apt-get remove imagej; sudo apt-get install imagej
resolved the problem.]

I also installed the Ubuntu packages for beanshell and swingx. I had to set the links into the
imagej plugin directory like this:
ln -s /usr/share/java/swingx.jar /usr/share/imagej/plugins

first problem:

some file didn't compile because of

error: ‘snprintf’ was not declared in this scope
[I installed the manpages and looked what header is missing.
sudo apt-get install manpages-dev
man snprintf
-> turns out you need stdio.h]

second problem:

[hidden email] g++ -DPACKAGE_NAME=\"Micro-Manager\" -DPACKAGE_TARNAME=\"micro-manager\" -DPACKAGE_VERSION=\"1.3.0\" -DPACKAGE_STRI
NG=\"Micro-Manager\ 1.3.0\" -DPACKAGE_BUGREPORT=\"[hidden email]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"micro-manager\" -DVERSION=\"1.3.0\" -DSTDC_HEADERS=1 -DHAVE_
SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DH
AVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DSTDC_HEADERS=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DSTDC_HEADERS=1 -DHAVE_MEMSET=1 -I.     -g -O -MT MMCore.o -MD
 -MP -MF .deps/MMCore.Tpo -c -o MMCore.o MMCore.cpp -Wall -W -Wextra
In file included from MMCore.cpp:70:
CircularBuffer.h:36: warning: ignoring #pragma warning
In file included from /usr/include/ace/OS_NS_dirent.h:149,
                 from /usr/include/ace/OS.h:32,
                 from MMCore.cpp:50:
/usr/include/ace/OS_NS_dirent.inl: In function ‘int ACE_OS::scandir(const ACE_TCHAR*, dirent***, int (*)(const dirent*), int (*)(const dirent**, const dirent**))’:
/usr/include/ace/OS_NS_dirent.inl:131: error: invalid conversion from ‘int (*)(const void*, const void*)’ to ‘int (*)(const dirent**, const dirent**)’
/usr/include/ace/OS_NS_dirent.inl:131: error:   initializing argument 4 of ‘int scandir(const char*, dirent***, int (*)(const dirent*), int (*)(const dirent**, const
dirent**))’
/usr/include/ace/OS_NS_dirent.inl: In function ‘int ACE_OS::alphasort(const void*, const void*)’:
/usr/include/ace/OS_NS_dirent.inl:152: error: invalid conversion from ‘const void*’ to ‘const dirent**’
/usr/include/ace/OS_NS_dirent.inl:152: error:   initializing argument 1 of ‘int alphasort(const dirent**, const dirent**)’
/usr/include/ace/OS_NS_dirent.inl:152: error: invalid conversion from ‘const void*’ to ‘const dirent**’
/usr/include/ace/OS_NS_dirent.inl:152: error:   initializing argument 2 of ‘int alphasort(const dirent**, const dirent**)’
In file included from MMCore.cpp:64:
../MMDevice/ImageMetadata.h: At global scope:
../MMDevice/ImageMetadata.h:92: warning: type qualifiers ignored on function return type

to fix this error I commented the line
//#define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR
in /usr/include/ace/config.h


third error:
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Arduino
Arduino.cpp: In member function ‘virtual int CArduinoSwitch::Initialize()’:
Arduino.cpp:296: error: ‘snprintf’ was not declared in this scope

[add
#include <stdio.h>
at the top of the Arduino.cpp]

4th error:
can't find sprintf
add stdio.h to
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ASIFW1000/ASIFW1000.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ASIFW1000/ASIFW1000Hub.cpp
sscanf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ASIStage/ASIStage.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/DemoCamera/DemoCamera.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/DemoRGBCamera/DemoRGBCamera.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/DemoStreamingCamera/DemoStreamingCamera.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/SerialManagerUNIX/SerialManager.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/SerialManagerUNIX/SerialPort.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/LeicaDMI/LeicaDMIScopeInterface.cpp
sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/LeicaDMR/LeicaDMR.cpp

#ifdef WIN32
   //#include <windows.h>
   #define snprintf _snprintf
#endif

snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Ludl/Ludl.cpp

snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/LudlLow/Ludl.cpp

snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Prior/Prior.cpp

sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Pecon/Pecon.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ZeissCAN/ZeissCAN.cpp
snprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/ZeissCAN29/ZeissCAN29.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/Conix/Conix.cpp
printf sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/NikonTE2000/NikonTE2000.cpp
sprintf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/NikonTE2000/TEHub.cpp
snprintf printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/K8055/K8055.cpp
printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/K8055/K8055Interface.cpp
snprintf printf
/home/martin/mm1005/micromanager1.3/DeviceAdapters/K8061/K8061.cpp

that is a lot of work. i just add stdio.h everywhere!

cd /home/martin/mm1005/micromanager1.3/DeviceAdapters
for i in `find .|grep \\.cpp$`
do
  echo "#include <stdio.h>" > /dev/shm/o
  cat $i >> /dev/shm/o
  cp /dev/shm/o $i
done



/home/martin/mm1005/micromanager1.3/DeviceAdapters/SpectralLMM5/SpectralLMM5.h:64: error: ‘uint16_t’ was not declared in this scope
-> add #include <stdint.h> to that file


so now everything is compiled



when I try to start Micromanager studio from within the imagej plugin menu I get
java.lang.UnsatisfiedLinkError: no MMCoreJ_wrap in java.library.path
and the hardwaredetection doesn't work

use
sudo update-alternatives --config java
to switch to java-6-sun

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/micro-manager/
martin@cyberpower:/usr/share/imagej$ java -jar ij.jar

--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------ Come build with us! The BlackBerry&reg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33; http://p.sf.net/sfu/devconf

_______________________________________________ micro-manager-general mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Martin Kielhorn


2009/10/6 Karl Bellve <[hidden email]>

I have sent a patch about including <stdio.h> back in July on some of the files due to the changes in GCC on newer linux distributions.

I guess as there are so many files that would need editing, an easy way would be to figure out the right command line argument, so that gcc will automatically parse the stdio.h header.

The best solution would be to write a script that includes stdio.h if the platform is Linux and if the file refers to some printf. However I couldn't figure out how to make a replacement over several lines with 'sed'.

--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Gordon Scott
Hi Martin,

If the plan is to edit all the files to add the relevant #include, then
I usually use 'ed' wrapped in a loop using the << operator to feed in
the commands, something like this bash script:

--------8<--------------------------
#!/bin/bash

for file in $(find . -name "*.[ch]" -exec grep -l printf "{}" \;)
do
    ed $file <<_EOF_
1i
#include <stdio.h>

.
w
q
_EOF_
done
--------8<--------------------------

That should put the #include as the first line of every file that
contains any printf, including the sprintf snprintf fprintf etc.
variants. It would not, of course handle PRINTF macros unless you add a
-i to the grep.

Caution: I've only tested this particular on a group of three small
files.

Explanations in case any of this is unfamiliar:

The for/do/dome iterates over a list of filenames supplied by the
pre-executed find+grep. The $( ... ) causes the pre-execution, leaving
the filenames on the command line. ready for use.

The word 'file' is just a variable, substituted at $file in the loop

1i starts an insert on line 1

The next two lines are the insert

The . ends the insert.

w and q write out the file and quit 'ed'.

The _EOF_ is just a finish label for the <<_EOF_ inline commands mode.

'done' loops to the next value of 'file', of course.

Bits I sometimes add for testing:
        echo "----- $file" (or similar just before the ed)
        p within the ed commands prints the current line
        -5,+5p (iirc) prints a short context.
        a '| more' after the done, usually with stderr redirection.

When the script runs, ed prints the number of chars read and the number
of chars written for each file.

HTH.

ATB,
        Gordon.
--
Gordon Scott  Design Engineering
            Custom Interconnect Ltd.   http://www.cil-uk.co.uk
            CoolLED                    http://www.coolled.com
            Phone +44-1264-321321
            CIL House, Charlton Road, Andover SP10 3JL, UK

 

> -----Original Message-----
> From: Martin Kielhorn [mailto:[hidden email]]
> Sent: 6 October 2009 19:27
> To: Micro-Manager General
> Subject: Re: [micro-manager-general] Ubuntu 9.10 x86
>
>
>
> 2009/10/6 Karl Bellve <[hidden email]>
>
>
>
> I have sent a patch about including <stdio.h> back in
> July on some of the files due to the changes in GCC on newer
> linux distributions.
>
>
>
> I guess as there are so many files that would need editing,
> an easy way would be to figure out the right command line
> argument, so that gcc will automatically parse the stdio.h header.
>
>
> The best solution would be to write a script that includes
> stdio.h if the platform is Linux and if the file refers to
> some printf. However I couldn't figure out how to make a
> replacement over several lines with 'sed'.
>
> --
> Martin Kielhorn
> Randall Division of Cell & Molecular Biophysics
> King's College London, New Hunt's House
> Guy's Campus, London SE1 1UL, U.K.
> tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435
>
>
>
>
> This message has been scanned by MailController
> <http://www.mailcontroller.altohiway.com/> .
>
>


This message has been scanned by MailController - www.MailController.altohiway.com

This message and any attachments are strictly confidential and intended solely for the addressee. Any unauthorized use or disclosure, in whole or in part, is prohibited. E-mails are subject to possible alteration. Custom Interconnect Ltd and the sender decline any liability if this message and/or any attachments have been altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender immediately.

Custom Interconnect Limited is a limited company registered in England and Wales. Registered number: 2026753. Registered office: CIL House 48 Charlton road Andover, Hampshire United Kingdom SP103JL.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Martin Kielhorn


2009/10/7 Gordon Scott <[hidden email]>
#!/bin/bash

for file in $(find . -name "*.[ch]" -exec grep -l printf "{}" \;)
do
   ed $file <<_EOF_
1i
#include <stdio.h>

.
w
q
_EOF_
done

Neat!

--
Martin Kielhorn

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Gordon Scott
 

> Neat!

Unix :-)

A hand variant .. you can search for and edit individual lines with
something like

g/some-regex/ s/this-regex/new-string/g

which can be great for thing like name changes.

Never forget regex 'hungry' behaviour, though!

ATB,
        Gordon.
--
Gordon Scott  Design Engineering
            Custom Interconnect Ltd.   http://www.cil-uk.co.uk
            CoolLED                    http://www.coolled.com
            Phone +44-1264-321321
            CIL House, Charlton Road, Andover SP10 3JL, UK



This message has been scanned by MailController - www.MailController.altohiway.com

This message and any attachments are strictly confidential and intended solely for the addressee. Any unauthorized use or disclosure, in whole or in part, is prohibited. E-mails are subject to possible alteration. Custom Interconnect Ltd and the sender decline any liability if this message and/or any attachments have been altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender immediately.

Custom Interconnect Limited is a limited company registered in England and Wales. Registered number: 2026753. Registered office: CIL House 48 Charlton road Andover, Hampshire United Kingdom SP103JL.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Nico Stuurman-4
In reply to this post by Martin Kielhorn
On Oct 6, 2009, at 4:44 AM, Martin Kielhorn wrote:

> I ran into problems when I upgraded
> this imagej as root from 1.43b to 1.43g with Help->Upgrade
> ImageJ... . The error looked like this:
>
> ./src/org/micromanager/image5d/Image5D.java:1357: cannot find symbol
> symbol  : class Resizer
> location: package ij.plugin.filter
>        PlugInFilter crop = new ij.plugin.filter.Resizer();

The class Resizer() moved form ij.plugin.filter to ij.plugin sometime  
between 1.43b and 1.43g.  We'll stay with the older version until  
there are compelling reasons to upgrade.

> first problem:
>
> you need stdio.h
>
> [add
> #include <stdio.h>

Quite interesting that stdio.h is not needed on Mac and with older gcc  
versions.  Is there some configuration/environment variable that  
includes it automatically.  In any case, it seems that the correct  
approach is to include it explicitly.  Do you happen to have a patch  
for this or shall I add these all directly?

Best,

Nico


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Martin Kielhorn


2009/10/8 Nico Stuurman <[hidden email]>
On Oct 6, 2009, at 4:44 AM, Martin Kielhorn wrote:

> I ran into problems when I upgraded
> this imagej as root from 1.43b to 1.43g with Help->Upgrade
> ImageJ... . The error looked like this:
>
> ./src/org/micromanager/image5d/Image5D.java:1357: cannot find symbol
> symbol  : class Resizer
> location: package ij.plugin.filter
>        PlugInFilter crop = new ij.plugin.filter.Resizer();

The class Resizer() moved form ij.plugin.filter to ij.plugin sometime
between 1.43b and 1.43g.  We'll stay with the older version until
there are compelling reasons to upgrade.

> first problem:
>
> you need stdio.h
>
> [add
> #include <stdio.h>

Quite interesting that stdio.h is not needed on Mac and with older gcc
versions.  Is there some configuration/environment variable that
includes it automatically.  In any case, it seems that the correct
approach is to include it explicitly.  Do you happen to have a patch
for this or shall I add these all directly?

I lost patience and eventually added stdio.h to the top of all .cpp files with the given script.
So a patch from my current sources is probably no good idea.

According to the man page of g++
'g++ -include stdio.h ...'
could do but I'm not sure.

--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519,  fax: +44 (0) 207 848 6435

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 9.10 x86

Gordon Scott
 

> -----Original Message-----
> From: Martin Kielhorn [mailto:[hidden email]]

> I lost patience and eventually added stdio.h to the top of
> all .cpp files with the given script.

Presuming it was the script I offered, modified for .cpp and .hpp, it
should only have added the include to files that use sprintf, which
presumably should have stdio.h.

Including the file twice is untidy but should be harmless if stdio.h has
the usual and sendible #ifndef __STDIO_H wrapper around its contents.

> So a patch from my current sources is probably no good idea.

I think that _Should_ be harmless and fairly sensible, though the
obvious caveats apply. An alternative would be to do the include within
some other 'always included' file, if there is one.

Files with duplicate includes for tidying can probably be found fairly
easily with a combination of find/grep/wc.

ATB,
        Gordon.
--
Gordon Scott  Design Engineering
            Custom Interconnect Ltd.   http://www.cil-uk.co.uk
            CoolLED                    http://www.coolled.com
            Phone +44-1264-321321
            CIL House, Charlton Road, Andover SP10 3JL, UK



This message has been scanned by MailController - www.MailController.altohiway.com

This message and any attachments are strictly confidential and intended solely for the addressee. Any unauthorized use or disclosure, in whole or in part, is prohibited. E-mails are subject to possible alteration. Custom Interconnect Ltd and the sender decline any liability if this message and/or any attachments have been altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender immediately.

Custom Interconnect Limited is a limited company registered in England and Wales. Registered number: 2026753. Registered office: CIL House 48 Charlton road Andover, Hampshire United Kingdom SP103JL.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general