# How to create mesh from levet set function

**URL:** <https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680>\
**Category:** General Discussion\
**Created:** [September 3, 2023, 7:18pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680 "2023-09-03T19:18:34Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 6, 2023, 4:29pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/22 "2023-09-06T16:29:48Z")

</div>

Thank you. I guess since I am on a virtual machine when I say  
./configure --enable-download --without-hd5 --prefix=${PWD}  
I get the error  
–prefix=/home/ceren/Desktop/FreeFem resources: no such file or directory. I am not sure how to define prefix to a vm folder. Any experience on that?

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 6, 2023, 4:31pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/23 "2023-09-06T16:31:57Z")

</div>

You are not typing the proper command on your machine, probably missing space, or extra new line, or something.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 6, 2023, 4:34pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/24 "2023-09-06T16:34:36Z")

</div>

I copy pasted from the document shared, but will check again. ${pwd} looks for a folder in my windows machine I guess (and not on ubuntu vm where I am trying to do the installation on) and that might be the source of the problem.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 6, 2023, 4:38pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/25 "2023-09-06T16:38:19Z")

</div>

Do not copy/paste, type in full. Depending on your PDF viewer, some characters may not be copy/paste’d correctly, e.g., `--` becomes `–`.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 6, 2023, 4:40pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/26 "2023-09-06T16:40:14Z")

</div>

you are right, that was actually the problem.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 7, 2023, 2:34pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/27 "2023-09-07T14:34:46Z")

</div>

Hello again,

I did follow the instructions on pdf and tried to compile the developer version (I am not sure if I sucsessfully did). However, I can not launch the example scripts using binaries of FreeFem (none works). I tried attaching config.log file that might point out the problem during installation which I do not understand, but I could not.

Thank you,

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 7, 2023, 2:46pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/28 "2023-09-07T14:46:12Z")

</div>

What error do you get? “None works” is not a very informative message…

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [September 7, 2023, 2:48pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/29 "2023-09-07T14:48:47Z")

</div>

What do you mean they did not work ? Any errors?  
First try “which FreeFem++” and make sure that points to the right one.  
I’m not entirely sure what you are doing but in the absence of a specific  
better idea, try running ldd on the  
binaries and post here Probably there are issues with the LD\_LIBRARY\_PATH  
among others. For example, look at output like this for any thing that is  
not resolved or points to something stale/wrong.

```auto
 ldd `which FreeFem++`
	linux-vdso.so.1 (0x00007ffd42384000)
	libumfpack.so.5 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libumfpack.so.5 (0x00007fd55cbbe000)
	libcholmod.so.3 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libcholmod.so.3 (0x00007fd55cab5000)
	libarpack.so.2 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libarpack.so.2 (0x00007fd55ca68000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd55ca37000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd55c8e8000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd55c704000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd55c6e9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd55c4f7000)
	libamd.so.2 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libamd.so.2 (0x00007fd55c4eb000)
	libsuitesparseconfig.so.5 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libsuitesparseconfig.so.5 (0x00007fd55c4e6000)
	libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007fd55c477000)
	libcolamd.so.2 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libcolamd.so.2 (0x00007fd55c46d000)
	libccolamd.so.2 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libccolamd.so.2 (0x00007fd55c45f000)
	libcamd.so.2 => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libcamd.so.2 (0x00007fd55c451000)
	libmetis.so => /home/ubuntu/dev/freefem/install/ff-petsc/r/lib/libmetis.so (0x00007fd55c3df000)
	liblapack.so.3 => /usr/lib/x86_64-linux-gnu/liblapack.so.3 (0x00007fd55bd3b000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd55bd16000)
	libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007fd55ba4e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fd55dd39000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fd55ba04000)
marchywka@happy:/home/documents/cpp/proj/freefem/forum$ 

```

.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 7, 2023, 3:25pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/30 "2023-09-07T15:25:26Z")

</div>

I think its not about how I use the binaries, instead, I could not configure this developer version correctly. When I run ./configure at the very end I see this error message

config.status: error: Something went wrong bootstrapping makefile fragments  
for automatic dependency tracking. If GNU make was not used, consider  
re-running the configure script with MAKE=“gmake” (or whatever is  
necessary). You can also try re-running configure with the  
‘–disable-dependency-tracking’ option to at least be able to build  
the package (albeit without support for automatic dependency tracking).  
See `config.log’ for more details

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 7, 2023, 8:21pm UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/31 "2023-09-07T20:21:56Z")

</div>

@prj I have also followed suggestions in this discussion [FreeFem++ PETSc configuration problem in Linux - #13 by vaalea](https://community.freefem.org/t/freefem-petsc-configuration-problem-in-linux/542/13)  
but same error persists

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 8, 2023, 6:08am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/32 "2023-09-08T06:08:06Z")

</div>

Yes, you need to go past the first configure error. I have no idea where it’s coming from without the full log.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 8, 2023, 6:22am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/33 "2023-09-08T06:22:45Z")

</div>

I did try uploading the log but I am new user and I am not allowed it seems.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 8, 2023, 6:29am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/34 "2023-09-08T06:29:41Z")

</div>

I changed the permission on your account, you should be able to do it now.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 8, 2023, 6:32am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/36 "2023-09-08T06:32:40Z")

</div>

[config.log](https://community.freefem.org/uploads/short-url/pngZsQITZGGv7ITsTGq4q4DD7cq.log) (159.3 KB)

Thank you, here it is.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 8, 2023, 6:45am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/37 "2023-09-08T06:45:27Z")

</div>

Clearly, these flags are not the one from the tutorial I sent earlier. Please try with these ones instead.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 8, 2023, 6:47am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/38 "2023-09-08T06:47:22Z")

</div>

Also, you probably messed up your system by installing things in `/` instead of a meaningful directory, so I would start from a clean VM. Also, there is nothing wrong with this `config.log`, so you just need to continue with the installation process (but I would start over because that `--prefix=/` flag is just a very bad idea).

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 8, 2023, 6:52am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/39 "2023-09-08T06:52:47Z")

</div>

I agree that I might be messed my system because I tried too many things. I will start over.

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 8, 2023, 8:03am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/40 "2023-09-08T08:03:45Z")

</div>

@prj started over, followed exact commands from presentation shared before.  
changed --prefix=/ to --prefix=${pwd} .  
[config (1).log](https://community.freefem.org/uploads/short-url/9RwbESMsKwuvKnFimRLDhf5vdld.log) (160.7 KB)

I passed the ./configure --enable-download --without-hdf5  
–prefix=${PWD} stage but during make petsc-slepc have attached error. Before following the suggestion at error message to not to mess up again, wanted to write here.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [September 8, 2023, 8:18am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/41 "2023-09-08T08:18:41Z")

</div>

You are still using an empty prefix. Set a value to something meaningful. I don’t see any PETSc error as well…

---

<div class="post-metadata">

**Author:** ![gurkanceren](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/gurkanceren/32/1893_2.png) [@gurkanceren](https://community.freefem.org/u/gurkanceren)\
**Post date:** [September 8, 2023, 11:08am UTC](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680/42 "2023-09-08T11:08:28Z")

</div>

@prj  
[config (2).log](https://community.freefem.org/uploads/short-url/ygYJeLRy3IHX748Esn1IiA1N1bK.log) (157.6 KB)  
created a folder named fem and passed the ./configure --enable-download --without-hdf5  
–prefix=/home/fem with no issues. When I do now

cd 3rdparty/ff-petsc  
make petsc-slepc

I see the attached error

[Previous page](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680.md?page=1)

[Next page](https://community.freefem.org/t/how-to-create-mesh-from-levet-set-function/2680.md?page=3)
